zsh-workers
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: zsh-workers@zsh.org
Subject: Error messages from VCS_INFO_get_data_git
Date: Sun, 24 May 2015 20:24:16 +0000	[thread overview]
Message-ID: <20150524202415.GD26436@vauxhall.crustytoothpaste.net> (raw)


[-- 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 --]

             reply	other threads:[~2015-05-24 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-24 20:24 brian m. carlson [this message]
2015-05-25 18:04 ` Daniel Hahler
2015-05-25 18:17   ` brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150524202415.GD26436@vauxhall.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).