Code

bash: teach __git_ps1 about CHERRY_PICK_HEAD
authorJay Soffian <jaysoffian@gmail.com>
Sun, 20 Feb 2011 04:12:28 +0000 (23:12 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Feb 2011 06:58:18 +0000 (22:58 -0800)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index 893b7716cafa4811d237480a980140d308aa20dc..0b0b913d287f5d70f8f8fdce5f16335dd1c6f9ec 100755 (executable)
@@ -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