From b25e2e64f68f3b1e790da9028c42b305c71580c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 7 Mar 2018 08:05:03 +0700 Subject: [PATCH] completion: complete --{reuse,reedit}-message= for all notes subcmds MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The new subcommand that takes these options is 'git notes edit'. Just accept the options from subcommands since we handle them the same way in builtin/notes.c anyway. If a user does git prune --reuse-message=... just let the command catches that error when it's executed. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 37bf4a64d3..dc3ec43b65 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1832,8 +1832,7 @@ _git_notes () ;; esac ;; - add,--reuse-message=*|append,--reuse-message=*|\ - add,--reedit-message=*|append,--reedit-message=*) + *,--reuse-message=*|*,--reedit-message=*) __git_complete_refs --cur="${cur#*=}" ;; *,--*) -- 2.47.1