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

Error messages from VCS_INFO_get_data_git



I'm using zsh 5.0.7 and I'm seeing some error messages when I use git
rebase -m with vcs_info.  One is already fixed in git, and if I copy the
git version of the file over my existing copy, I get the following:

  grep: .git/rebase-merge/git-rebase-todo: No such file or directory

I'm using Git 2.4.0, and that file doesn't appear to exist in newer Git
versions.  I've also tried with Git 2.1.4, and it appears to be absent
there as well.

The fix is probably as simple as redirecting stderr in that case to
/dev/null.  A patch to do exactly that is attached.

Please CC me, as I'm not subscribed.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index c348da2..80c6df3 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -210,7 +210,7 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
         # remove action
         git_patches_applied+=("${${(s: :)p}[2,-1]}")
     done
-    git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})
+    git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" 2>/dev/null | grep -v '^#')"})
     VCS_INFO_git_handle_patches
 elif [[ -d "${gitdir}/rebase-apply" ]]; then
     # Fake patch names for all but current patch

Attachment: signature.asc
Description: Digital signature



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