From: Junio C Hamano Date: Thu, 20 Jun 2013 18:03:39 GMT Subject: Re: [PATCH] peel_onion(): add support for ^{tag} Message-ID: <7v4ncswtfo.fsf@alter.siamese.dyndns.org> In-Reply-To: <51C20FD1.4090203@bbn.com> Richard Hansen writes: > Barfing on non-tags is the feature this adds. It's otherwise useless, > just like ^{object} is useless except to barf when > doesn't exist. Thanks. I could buy that. And after re-reading the proposed log message, you do not quite have anything to say that. Instead, you have this: Note that ^{tag} is not the same as ^{object} when is not a tag: $ git rev-parse --verify v1.8.3.1^{}^{object} 362de916c06521205276acb7f51c99f47db94727 $ git rev-parse --verify v1.8.3.1^{}^{tag} error: v1.8.3.1^{}^{tag}: expected tag type, but the object deref... fatal: Needed a single revision The latter peels v1.8.3.1 to a non-tag (i.e. a commit) and then asks to peel that commit to a tag, which will of course fail, but that is not a good example. Perhaps something like this instead. Note that ^{tag} can be used to make sure names a tag: $ git rev-parse --verify v1.8.3.1^{tag} $ git rev-parse --verify master^{tag} The former succeeds, while the latter fails.