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

[PATCH] bash completion: complete CHERRY_PICK_HEAD

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 7, 2021, 10:50 UTC
Message-ID
<patch-1.1-483669af7fc-20210407T105035Z-avarab@gmail.com>

When e.g. in a failed cherry pick we did not recognize CHERRY_PICK_HEAD as we do e.g. REBASE_HEAD in a failed rebase let's rectify that.

When REBASE_HEAD was added in fbd7a232370 (rebase: introduce and use pseudo-ref REBASE_HEAD, 2018-02-11) a completion was added for it, but no corresponding completion existed for CHERRY_PICK_HEAD added in d7e5c0cbfb0 (Introduce CHERRY_PICK_HEAD, 2011-02-19).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 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 e1a66954fe8..dbb290956b6 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -744,7 +744,7 @@ __git_refs ()
 			track=""
 			;;
 		*)
-			for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD; do
+			for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do
 				case "$i" in
 				$match*)
 					if [ -e "$dir/$i" ]; then
-- 
2.31.1.527.g9b8f7de2547
Next: Junio C Hamano
Message 1 of 2 in “bash completion: complete CHERRY_PICK_HEAD”
  1. bash completion: complete CHERRY_PICK_HEADÆvar Arnfjörð Bjarmason, Apr 7, 2021
  2. Junio C HamanoApr 7, 2021

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.