Re: fatal: ambiguous message
- From
Bruce Korb <bruce.korb@gmail.com>
- Date
- Jan 2, 2011, 18:03 UTC
- Message-ID
- <4D20BE0B.6040104@gmail.com>
- In-Reply-To
- <4D1DFF96.4010004@redhat.com>
On 12/31/10 08:06, Eric Blake wrote:
Show 6 quoted lines
> On 12/30/2010 06:37 PM, Bruce Korb wrote: >> Hi, >> >> Is this fatal? If so, how come it continued? > > It's fatal to git-version-gen, which did not continue.
git-version-gen has but two fatal conditions: invalid arguments yielding a usage message and an unreadable "tarball version file". That is not this message, but might be clarified with:
v=`cat $tarball_version_file 2>&1` || {
echo "$0 error: unreadable tarball version file $1: $v" >&2
exit 1
}In any event, the invocation is: ./git-version-gen .tarball-version and the file ".tarball-version" does not exist, hence git-version-gen should not fail at all. 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.
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.
Note to GIT list: the message in question:
fatal: ambiguous argument 'v0.1..HEAD': unknown revision \
or path not in the working tree.Thanks! Regards, Bruce