Re: [PATCH 4/6] completion: correct completion for format-patch
Felipe Contreras wrote: > This breaks 'git format-patch master..'. Oh, ouch. > Moreover, this is a perfectly fine usage of 'git format-patch': > > % git format-patch --full-diff master..fc/remote/hg-next -- > contrib/remote-helpers/git-remote-bzr Never mind then. Drop this patch. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6] completion: correct completion for format-patch
On Sun, Jun 2, 2013 at 9:03 AM, Ramkumar Ramachandra wrote: > Currently, the completion for 'git format-patch' uses > __git_complete_revlist. Although this is technically correct, and you > can > > $ git format-patch master contrib > > where master is a ref and contrib is a pathspec, just like in 'git log', > the usage is unidiomatic and undocumented. 'git format-patch' is used > without pathspec filtering most of the time, and it makes sense to > provide sensible completions using __git_refs. This breaks 'git format-patch master..'. Moreover, this is a perfectly fine usage of 'git format-patch': % git format-patch --full-diff master..fc/remote/hg-next -- contrib/remote-helpers/git-remote-bzr Plus, even even with your patch 'contrib' will be completed regardless (by default completion), wouldn't it? NAK. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/6] completion: correct completion for format-patch
Currently, the completion for 'git format-patch' uses __git_complete_revlist. Although this is technically correct, and you can $ git format-patch master contrib where master is a ref and contrib is a pathspec, just like in 'git log', the usage is unidiomatic and undocumented. 'git format-patch' is used without pathspec filtering most of the time, and it makes sense to provide sensible completions using __git_refs. Signed-off-by: Ramkumar Ramachandra --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a003b81..f46964d 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1347,7 +1347,7 @@ _git_format_patch () return ;; esac - __git_complete_revlist + __gitcomp_nl "$(__git_refs)" } _git_fsck () -- 1.8.3.457.g2410d5e -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html