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

[PATCH v4 3/4] bash: teach __git_ps1 about CHERRY_PICK_HEAD

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 20, 2011, 04:12 UTC
Message-ID
<1298175149-41178-4-git-send-email-jaysoffian@gmail.com>
In-Reply-To
<1298175149-41178-1-git-send-email-jaysoffian@gmail.com>

Make the git prompt (when enabled) show a CHERRY-PICKING indicator when we are in the middle of a conflicted cherry-pick, analogous to the existing MERGING and BISECTING flags.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 contrib/completion/git-completion.bash |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 893b771..0b0b913 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -246,6 +246,8 @@ __git_ps1 ()
 				fi
 			elif [ -f "$g/MERGE_HEAD" ]; then
 				r="|MERGING"
+			elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
+				r="|CHERRY-PICKING"
 			elif [ -f "$g/BISECT_LOG" ]; then
 				r="|BISECTING"
 			fi
-- 
1.7.4.1.51.g615e0
Previous: Jay SoffianNext: Jay Soffian
Message 4 of 5 in “CHERRY_PICK_HEAD”
  1. 0/4 CHERRY_PICK_HEADJay Soffian, Feb 20, 2011
  2. 1/4 t3507: introduce pristine-detach helperJay Soffian, Feb 20, 2011
  3. 2/4 Introduce CHERRY_PICK_HEADJay Soffian, Feb 20, 2011
  4. 3/4 bash: teach __git_ps1 about CHERRY_PICK_HEADJay Soffian, Feb 20, 2011
  5. 4/4 Teach commit about CHERRY_PICK_HEADJay Soffian, Feb 20, 2011

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.