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

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 25, 2008, 20:34 UTC
Message-ID
<20080725203410.GA23202@spearce.org>
In-Reply-To
<1216813762-23511-2-git-send-email-szeder@ira.uka.de>
SZEDER GGGbor <szeder@ira.uka.de> wrote:
> Commit d773c631 (bash: offer only paths after '--', 2008-07-08) did the
> same for several other git commands, but 'git checkout' went unnoticed.
> 
> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 13 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 2edb341..9b51fda 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -626,6 +626,8 @@ _git_bundle ()
>  
>  _git_checkout ()
>  {
> +	__git_has_doubledash && return
> +
>  	__gitcomp "$(__git_refs)"
>  }
>  
-- 
Shawn.
Previous: SZEDER Gábor
Message 16 of 16 in “git-checkout: fix argument parsing to detect ambiguous arguments.”
  1. git-checkout: fix argument parsing to detect ambiguous arguments.Pierre Habouzit, Jul 23, 2008
  2. Pierre HabouzitJul 23, 2008
  3. Johannes SchindelinJul 23, 2008
  4. Pierre HabouzitJul 23, 2008
  5. git-checkout: fix argument parsing to detect ambiguous arguments.Pierre Habouzit, Jul 23, 2008
  6. Pierre HabouzitJul 23, 2008
  7. Johannes SchindelinJul 23, 2008
  8. Resubmit after a night of sleepPierre Habouzit, Jul 23, 2008
  9. 1/2 git-checkout: fix command line parsing.Pierre Habouzit, Jul 23, 2008
  10. 2/2 git-checkout: improve error messages, detect ambiguities.Pierre Habouzit, Jul 23, 2008
  11. Junio C HamanoJul 23, 2008
  12. Junio C HamanoJul 24, 2008
  13. Pierre HabouzitJul 24, 2008
  14. checkout: mention '--' in the docsSZEDER Gábor, Jul 23, 2008
  15. bash: offer only paths after '--' for 'git checkout'SZEDER Gábor, Jul 23, 2008
  16. Shawn O. PearceJul 25, 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.