From: Junio C Hamano Date: Tue, 08 Jul 2008 23:23:01 GMT Subject: Re: [PATCH] bash: offer only paths after '--' Message-ID: <7v7ibwq7u2.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080708231837.GA16895@spearce.org> "Shawn O. Pearce" writes: > Junio C Hamano wrote: >> SZEDER Gábor writes: >> >> > Hope that I got the commit message right (; >> >> It was very readable. Thanks. > > Acked-by: Shawn O. Pearce > >> > +__git_has_doubledash () >> > +{ >> > + local c=1 >> > + while [ $c -lt $COMP_CWORD ]; do >> > + if [ "--" = "${COMP_WORDS[c]}" ]; then >> > + return 0 >> > + fi >> > + c=$((++c)) >> >> This assignment is somewhat curious, although it should work as expected >> either way ;-) > > I agree, its damned odd. But we already do this in the same > sort of loop inside of _git_branch() (see around line 541 in > next). This new patch is only sticking with our current set > of conventions in the script, so I say its fine. Chuckling... Thanks for sanity checking and an Ack.