about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 53d69d205..8ee4921cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-12-16  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 40149: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
+	vcs_info git: Avoid a fork.
+
 	* 40203: Test/B03print.ztst: Resolve 'printf --' question from
 	grandparent commit (thanks Chet).
 
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 65d8cb182..63109aa46 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -221,7 +221,7 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
         git_patches_applied+=("$p")
     done
     if [[ -f "${patchdir}/git-rebase-todo" ]] ; then
-        git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})
+        git_patches_unapplied=( ${${(f)${"$(<"${patchdir}/git-rebase-todo")"}}:#[#]*} )
     fi
     VCS_INFO_git_handle_patches
 elif [[ -d "${gitdir}/rebase-apply" ]]; then