On Sun, Nov 04, 2007 at 07:44:03AM +0000, Junio C Hamano wrote: > Pierre Habouzit <madcoder@xxxxxxxxxx> writes: > > > Also fix some space versus tabs issues. > > --- > > git-checkout.sh | 99 +++++++++++++++++++++++++++---------------------------- > > 1 files changed, 49 insertions(+), 50 deletions(-) > > > > diff --git a/git-checkout.sh b/git-checkout.sh > > index 8993920..5424745 100755 > > --- a/git-checkout.sh > > +++ b/git-checkout.sh > > @@ -1,6 +1,16 @@ > > #!/bin/sh > > > > -USAGE='[-q] [-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]' > > +PARSEOPT_OPTS=--keep-dashdash > > +OPTIONS_SPEC="\ > > +git-branch [options] [<branch>] [<paths>...] > > +-- > > +b= create a new branch started at <branch> > > +l create the new branchs reflog > > +track tells if the new branch should track the remote branch > > +f proceed even if the index or working tree is not HEAD > > +m performa three-way merge on local modifications if needed > > +q,quiet be quiet > > +" > > Ok, so this is how PARSEOPT_OPTS gets used. It is a way for the > command that sources git-sh-setup to tell the parseopt code what > to do. I can agree with this, but then all the other commands > that do not set PARSEOPT_OPTS before sourcing git-sh-setup > should set it to empty string. Otherwise the users can screw > you with their environment variables. yes it's the why, and it's also the why this variable isn't quoted because it is meant to get options to pass to git-rev-parse --parseopt In fact it's only used in git-checkout right now. I believe the proper way to do that is that git-sh-setup does a PARSEOPT_OPTS= and that git-checkout.sh its sole user overrides it once git-sh-setup is sourced. I'll send the two updated patches for that. -- ·O· Pierre Habouzit ··O madcoder@xxxxxxxxxx OOO http://www.madism.org
Attachment:
pgpX197ZgMvNW.pgp
Description: PGP signature