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

Re: [PATCH] completion: complete "git diff ...branc<TAB>"

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 24, 2011, 12:24 UTC
Message-ID
<4D664E19.5080804@drmicha.warpmail.net>
In-Reply-To
<7vlj1677gz.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 23.02.2011 22:43:
Show 19 quoted lines
> While doing a final sanity check before merging a topic Bsomething, it is
> a good idea to review what damage Bsomething branch would make, by running:
> 
>     $ git diff ...Bsomething
> 
> I however find myself often typing "git diff ...B<TAB>", seeing nothing
> happening and then repeatedly hitting <TAB>, saying "huh? <TAAAAAAAAB>!".
> 
> This change would hopefully help me, and others like me.
> 
> Even though there is no point in supporting "git diff A..B" (you can say
> "git diff A B" just fine), but reusing complete-revlist was the easiest
> and that form is supported as a benign but not so useful side effect.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  * I sent this out a while ago and have been using it ever since, but
>    totally forgot about it.  Likes, dislikes, alternatives?
Likes
Reminds me fo the following: Typing
git log origin/next@{1}..o<TAB>
gives
git log origin/next{1}..o
WTF? Completion eats at babies!
Michael
Previous: Junio C HamanoNext: SZEDER Gábor
Message 2 of 9 in “completion: complete "git diff ...branc<TAB>"”
  1. completion: complete "git diff ...branc<TAB>"Junio C Hamano, Feb 23, 2011
  2. Michael J GruberFeb 24, 2011
  3. SZEDER GáborFeb 24, 2011
  4. Michael J GruberFeb 24, 2011
  5. SZEDER GáborFeb 24, 2011
  6. Junio C HamanoFeb 24, 2011
  7. 1/2 bash: fix misindented esac statement in __git_complete_file()SZEDER Gábor, Mar 10, 2011
  8. 2/2 bash: complete 'git diff ...branc<TAB>'SZEDER Gábor, Mar 10, 2011
  9. Junio C HamanoMar 10, 2011

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.