Re: [BUG (maybe)] git rev-parse --verify --quiet isn't quiet
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 4, 2014, 17:57 UTC
- Message-ID
- <xmqq1trruv3b.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <loom.20140904T131954-274@post.gmane.org>
Øystein Walle <oystwa@gmail.com> writes:
Show 9 quoted lines
> I noticed this while writing a small script for myself:
>
> $ git rev-parse --verify --quiet '@{u}'
> fatal: No upstream configured for branch 'local'
>
> The functions that get run when rev-parse does its thing all return a
> pointer to a strbuf, return the length of the modified buf or something
> to that effect. However get_upstream_branch() calls die() which writes
> to stderr unconditionally.I would suspect that this may be fine.
"rev-parse --verify" makes sure the named object exists, but in this case @{u} does not even name any object, does it?
Show 6 quoted lines
> On a related note: > > $ git branch origin/master > $ git rev-parse --verify --quiet origin/master > warning: refname 'origin/master' is ambiguous. > 7c07808349fd0fc2c61a169833eeb55163cf3df4
And this warning is in the same vein, I would suspect.