Subject: Re: [BUG (maybe)] git rev-parse --verify --quiet isn't quiet

From: Junio C Hamano <[email-masked]>
Date: Thu, 04 Sep 2014 10:57:44 -0700

Øystein Walle <[email-masked]> writes:

> 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?

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