zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] vcs_info git: error before start of rebase
@ 2015-03-07  4:21 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-03-07  4:21 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-07  4:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-07  4:21 [PATCH] vcs_info git: error before start of rebase Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).