-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage output should use git foo
when invoked via git
#1154
Comments
PR is welcome! |
@spacewander Any suggestion on whether I pursue option 1, 2, or 3? Also, how complete would such a change need to be to get accepted? I notice a lot of the git-extras scripts were written with different usage string paradigms already, probably copied from different upstream behaviors. Some of them will be easy to convert to use something more flexible. Others are already very complex and may be difficult to convert. |
I don't have a strong opinion, but I would vote for option 1. It's the easiest way to implement. |
I have underestimated how many different usage output paradigms there would be in the different scripts here. This will be a bigger undertaking than I originally thought. I still want to do it, just not today. |
@sparr |
If I run the
git-cp
script directly with no parameters, the output saysUSAGE: /foo/bar/bin/git-cp [...]
which is on point. I might want it to just saygit-cp
there, but that's a minor quibble.More importantly, and the subject of this issue, is that if I run
git cp
and git searches my path to find thegit-cp
script, then the output STILL saysUSAGE: /foo/bar/bin/git-cp [...]
when I think it should sayUSAGE: git cp [...]
in keeping with the behavior of most other git commands.Some git command scripts included with git use different approaches for this:
git-archimport
,git-cvsexportcommit
,git-cvsimport
,git-cvsserver
, andgit-merge-one-file
all hard code the usage text ofgit whatever
without regard for the actual filenamegit-filter-branch
,git-merge-one-file
,git-mergetool
,git-submodule
, andgit-web--browse
all usegit-sh-setup
'susage()
to parse the script filename and blindly removes the first dashgit-p4
does whatgit-extras
does now, outputting the full path to the scriptI propose one of the following solutions:
git foo
as the usage invocation forgit-foo
across all the scriptsgit-sh-setup
'susage()
GIT_EXEC_PATH
I volunteer to implement any of these if you pick one.
The text was updated successfully, but these errors were encountered: