about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2013-03-10 12:47:39 +0000
committerMikael Magnusson <mikachu@gmail.com>2013-03-10 12:47:39 +0000
commit0c8625299ae79759ef909c0909b8f7e9b9003d30 (patch)
tree612c894d1a89dad4590c869e502ad3708e195eed
parentba88c42a5b1ed3bd60ae0fe67a2b9267bafeaea2 (diff)
downloadzsh-0c8625299ae79759ef909c0909b8f7e9b9003d30.tar.gz
zsh-0c8625299ae79759ef909c0909b8f7e9b9003d30.tar.xz
zsh-0c8625299ae79759ef909c0909b8f7e9b9003d30.zip
30639: Add support for showing the current action is cherry-pick to vcs_info git backend
-rw-r--r--ChangeLog6
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d8d36720d..a586be32f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
 	* 30490: Completion/Unix/Command/_java: Complete files for the
 	-keystore argument.
 
+	* 30639: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
+	Add support for showing the current action is cherry-pick (happens
+	when cherry-picking a range).
+
 2013-03-05  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* users/17666: Doc/Zsh/contrib.yo, Functions/Misc/zcalc: -f
@@ -570,5 +574,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5814 $
+* $Revision: 1.5815 $
 *****************************************************
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index e40571a0e..787e76302 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -52,6 +52,17 @@ VCS_INFO_git_getaction () {
         printf '%s' "bisect"
         return 0
     fi
+
+    if [[ -f "${gitdir}/CHERRY_PICK_HEAD" ]] ; then
+        if [[ -d "${gitdir}/sequencer" ]] ; then
+            gitaction=cherry-seq
+        else
+            gitaction=cherry
+        fi
+        printf '%s' ${gitaction}
+        return 0
+    fi
+
     return 1
 }