From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: [PATCH] completion: complete "git diff ...branc<TAB>"
Date: Wed, 23 Feb 2011 13:43:08 -0800 [thread overview]
Message-ID: <7vlj1677gz.fsf@alter.siamese.dyndns.org> (raw)
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?
contrib/completion/git-completion.bash | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 64341d5..cf56514 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1137,7 +1137,7 @@ _git_diff ()
return
;;
esac
- __git_complete_file
+ __git_complete_revlist
}
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
next reply other threads:[~2011-02-23 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 21:43 Junio C Hamano [this message]
2011-02-24 12:24 ` [PATCH] completion: complete "git diff ...branc<TAB>" Michael J Gruber
2011-02-24 13:58 ` SZEDER Gábor
2011-02-24 14:07 ` Michael J Gruber
2011-02-24 15:13 ` SZEDER Gábor
2011-02-24 17:09 ` Junio C Hamano
2011-03-10 18:12 ` [PATCH 1/2] bash: fix misindented esac statement in __git_complete_file() SZEDER Gábor
2011-03-10 18:12 ` [PATCH 2/2] bash: complete 'git diff ...branc<TAB>' SZEDER Gábor
2011-03-10 19:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vlj1677gz.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.