From: Jonathan Nieder <jrnieder@gmail.com>
To: Bruce Korb <bruce.korb@gmail.com>
Cc: Eric Blake <eblake@redhat.com>,
GIT Development <git@vger.kernel.org>,
GNU Autoconf mailing list <autoconf@gnu.org>
Subject: Re: fatal: ambiguous message
Date: Sun, 2 Jan 2011 12:34:53 -0600 [thread overview]
Message-ID: <20110102183453.GA13463@burratino> (raw)
In-Reply-To: <4D20BE0B.6040104@gmail.com>
Hi,
Context: http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob;f=build-aux/git-version-gen
Bruce Korb wrote:
> So, this message says, "fatal: ..."
> and comes from git and all three "git" invocations redirect stderr to
> /dev/null. The fact that we see it is a git bug. Error messages
> should be directed to stderr and thus written to /dev/null.
Were you been able to reproduce that outside the script?
> So, git-version-gen is correct to continue, but git should fail
> with a message that names the program that fails ("git") and
> should direct the message to stderr.
No thoughts on this part. git has at least four kinds of message it
sends to stderr (fatal:, warning:, error:, and usage:) but I am
not sure it is useful to distinguish them ---
git add: pathspec 'nonsense' did not match any files
might be nicer.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 5617eb8..119d7aa 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -119,7 +119,7 @@ then
# result is the same as if we were using the newer version
# of git describe.
vtag=`echo "$v" | sed 's/-.*//'`
- numcommits=`git rev-list "$vtag"..HEAD | wc -l`
+ numcommits=`git rev-list "$vtag"..HEAD 2>/dev/null | wc -l`
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
;;
esac
next prev parent reply other threads:[~2011-01-02 18:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4D1D33D7.7040809@gmail.com>
[not found] ` <4D1DFF96.4010004@redhat.com>
2011-01-02 18:03 ` fatal: ambiguous message Bruce Korb
2011-01-02 18:34 ` Jonathan Nieder [this message]
2011-01-03 0:16 ` Bruce Korb
2011-01-03 15:04 ` Eric Blake
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=20110102183453.GA13463@burratino \
--to=jrnieder@gmail.com \
--cc=autoconf@gnu.org \
--cc=bruce.korb@gmail.com \
--cc=eblake@redhat.com \
--cc=git@vger.kernel.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.
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).