zsh-workers
 help / color / mirror / code / Atom feed
* Error messages from VCS_INFO_get_data_git
@ 2015-05-24 20:24 brian m. carlson
  2015-05-25 18:04 ` Daniel Hahler
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2015-05-24 20:24 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 825 bytes --]

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

[-- Attachment #1.2: vcs-info-git-patch --]
[-- Type: text/plain, Size: 748 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-25 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-24 20:24 Error messages from VCS_INFO_get_data_git brian m. carlson
2015-05-25 18:04 ` Daniel Hahler
2015-05-25 18:17   ` brian m. carlson

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).