On Thu, Jun 06, 2013 at 06:05:44PM -0700, Junio C Hamano wrote: > SZEDER Gábor <szeder@xxxxxxxxxx> writes: > > > On Thu, Jun 06, 2013 at 03:41:08PM -0700, Junio C Hamano wrote: > >> * rr/complete-difftool (2013-06-03) 2 commits > >> (merged to 'next' on 2013-06-04 at 01c7611) > >> + completion: clarify ls-tree, archive, show completion > >> + completion: difftool takes both revs and files > >> > >> Update command line completion (in contrib/) to use a better named > >> completion helper function for commands that take revisions and > >> paths. > >> > >> Will merge to 'master'. > > > > This should not be merged to master as is; the one at the top because > > of the reasons given in $gmane/226272, the one at the bottom because > > of the misleading commit message (__git_complete_file() always > > completed refs first as part of the ref:file notation, so it worked > > just fine except for the ref1...ref2 notation; the real reason for > > calling __git_complete_revlist_file() for difftool is to make clear > > that difftool takes ref1...ref2:file, too). > > Oops. > > It is too late to amend the log messages now, but at least a follow-up > patch can fix the breakage by adding __git_complete_file() back. Would > you mind doing that? Is it in master already? Am I missing something? Wouldn't it be cleaner to revert those two patches from next and apply this instead? -- >8 -- From: SZEDER Gábor <szeder@xxxxxxxxxx> Subject: [PATCH] completion: be explicit about revlist completion for difftool and show The completion functions for 'git difftool' and 'git show' call __git_complete_file() to support completion of the 'ref:path' notation. However, these two commands also understand the 'ref1..ref2:path' notation, the completion of which we happen to support accidentaly, because nowadays __git_complete_file() is a wrapper around __git_complete_revlist_file(). Let's be explicit about it and call __git_complete_revlist_file() directly. Signed-off-by: SZEDER Gábor <szeder@xxxxxxxxxx> --- contrib/completion/git-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 56c52c66..fd9a1d5f 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1211,7 +1211,7 @@ _git_difftool () return ;; esac - __git_complete_file + __git_complete_revlist_file } __git_fetch_options=" @@ -2277,7 +2277,7 @@ _git_show () return ;; esac - __git_complete_file + __git_complete_revlist_file } _git_show_branch () -- 1.8.0.220.g4d14ece -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html