threads / patch / 45984

patchcompletion: add git stash push

Subject: [PATCH] completion: add git stash push

## tl;dr

3 messages between May 16, 2017 and May 17, 2017. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Thomas Gummerer· May 16, 2017, 19:59 UTC · lore

When introducing git stash push in f5727e26e4 ("stash: introduce push verb", 2017-02-19), I forgot to add it to the completion code. Add it now.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
 contrib/completion/git-completion.bash | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Show changes to contrib/completion/git-completion.bash +4 −1
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index af658995d5..3f01249116 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2810,7 +2810,7 @@ _git_show_branch ()
 _git_stash ()
 {
 	local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
-	local subcommands='save list show apply clear drop pop create branch'
+	local subcommands='push save list show apply clear drop pop create branch'
 	local subcommand="$(__git_find_on_cmdline "$subcommands")"
 	if [ -z "$subcommand" ]; then
 		case "$cur" in
@@ -2825,6 +2825,9 @@ _git_stash ()
 		esac
 	else
 		case "$subcommand,$cur" in
+		push,--*)
+			__gitcomp "$save_opts --message"
+			;;
 		save,--*)
 			__gitcomp "$save_opts"
 			;;
-- 
2.13.0.rc2.279.g813ba54fc
Jonathan Nieder· May 16, 2017, 20:12 UTC · re: Thomas Gummerer · lore

Re: [PATCH] completion: add git stash push

Thomas Gummerer wrote:
Show 8 quoted lines
> When introducing git stash push in f5727e26e4 ("stash: introduce push
> verb", 2017-02-19), I forgot to add it to the completion code. Add it
> now.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.
Junio C Hamano· May 17, 2017, 03:16 UTC · re: Jonathan Nieder · lore

Re: [PATCH] completion: add git stash push

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 12 quoted lines
> Thomas Gummerer wrote:
>
>> When introducing git stash push in f5727e26e4 ("stash: introduce push
>> verb", 2017-02-19), I forgot to add it to the completion code. Add it
>> now.
>>
>> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
>> ---
>>  contrib/completion/git-completion.bash | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks, both.  Will queue.

← back to recent threads