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

[PATCH] vcs_info git: error before start of rebase



The following:

    1. git rebase -i HEAD^
    2. While editor is running, open a shell.

... results in a warning message before the prompt:

    VCS_INFO_get_data_git:208: no such file or directory: .git/rebase-merge/done                                                                             
Proposed fix:

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 48d552f..c348da2 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -205,6 +205,7 @@ then
 elif [[ -d "${gitdir}/rebase-merge" ]]; then
     patchdir="${gitdir}/rebase-merge"
     local p
+    [[ -f "${patchdir}/done" ]] &&
     for p in ${(f)"$(< "${patchdir}/done")"}; do
         # remove action
         git_patches_applied+=("${${(s: :)p}[2,-1]}")

Cheers,

Daniel



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