git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bash: offer only paths after '--'

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2008, 23:23 UTC
Message-ID
<7v7ibwq7u2.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080708231837.GA16895@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 25 quoted lines
> Junio C Hamano <gitster@pobox.com> wrote:
>> SZEDER Gábor <szeder@ira.uka.de> writes:
>> 
>> > Hope that I got the commit message right (;
>> 
>> It was very readable.  Thanks.
>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>
>
>> > +__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.
Previous: Shawn O. PearceNext: SZEDER Gábor
Message 9 of 12 in “completion: add branch options --contains --merged --no-merged”
  1. completion: add branch options --contains --merged --no-mergedEric Raible, Jul 7, 2008
  2. Shawn O. PearceJul 8, 2008
  3. Junio C HamanoJul 8, 2008
  4. Johannes SchindelinJul 8, 2008
  5. bash: offer only paths after '--'SZEDER Gábor, Jul 8, 2008
  6. Eric RaibleJul 8, 2008
  7. Junio C HamanoJul 8, 2008
  8. Shawn O. PearceJul 8, 2008
  9. Junio C HamanoJul 8, 2008
  10. SZEDER GáborJul 8, 2008
  11. Shawn O. PearceJul 8, 2008
  12. Junio C HamanoJul 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.