From: Jeff King Date: Tue, 09 Jul 2013 05:35:33 GMT Subject: Re: [PATCH 4/4] describe/name-rev: tell name-rev to peel the incoming object to commit first Message-ID: <20130709053533.GA4395@sigill.intra.peff.net> In-Reply-To: <7va9lwxpp5.fsf@alter.siamese.dyndns.org> On Mon, Jul 08, 2013 at 10:33:26PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > 1. Behave more or less the same between "git name-rev $sha1" and "echo > > $sha1 | git name-rev --stdin". Your patch improves that. Though I > > note that --peel-to-commit does not affect --stdin at all. Should > > it? And of course the two differ in that the command line will take > > any rev-parse expression, and --stdin only looks for full sha1s. > > To "Should it?", I do not deeply care. "--peel-to-commit" is an > exception that only is needed to support "describe". > > I could instead have tucked "^0" at the end of each argument when > "describe" calls out to "name-rev" without adding this new option, > which is much much closer to what is really going on. Yeah, I tend to think that is a more sane interface, even though it is a little more work in git-describe. Although I am still not clear on why it would not be up to the caller of git-describe in the first place to decide which they wanted. -Peff