git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] completion: fix completing stashes with "show -p"

From
Ville Skyttä <ville.skytta@iki.fi>
Date
May 21, 2020, 14:21 UTC
Message-ID
<20200521142156.4717-1-ville.skytta@iki.fi>
Regression in df70b190bdd2add42a906819f9d41dbf91cf0809
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
---
 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 70ad04e1b2..8dc4ad0e0d 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2782,7 +2782,7 @@ _git_stash ()
 	local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
 	local subcommands='push list show apply clear drop pop create branch'
 	local subcommand="$(__git_find_on_cmdline "$subcommands save")"
-	if [ -n "$(__git_find_on_cmdline "-p")" ]; then
+	if [ -z "$subcommand" -a -n "$(__git_find_on_cmdline "-p")" ]; then
 		subcommand="push"
 	fi
 	if [ -z "$subcommand" ]; then
-- 
2.27.0.rc1.dirty
Next: Junio C Hamano
Message 1 of 3 in “completion: fix completing stashes with "show -p"”
  1. completion: fix completing stashes with "show -p"Ville Skyttä, May 21, 2020
  2. Junio C HamanoMay 21, 2020
  3. Ville SkyttäMay 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.