Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits



When revert or cherry-pick involve many commits the .git/sequencer
directory holds context for the action and no CHERRY_PICK_HEAD exist.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 76ab92f..263a325 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -62,6 +62,11 @@ VCS_INFO_git_getaction () {
         return 0
     fi
 
+    if [[ -d "${gitdir}/sequencer" ]] ; then
+         gitaction="cherry-or-revert"
+         return 0
+    fi
+
     return 1
 }
 
-- 
2.1.0



Messages sorted by: Reverse Date, Date, Thread, Author