Øystein Walle <oystwa@xxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html