public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Richard Hansen <rhansen@bbn•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] peel_onion(): add support for <rev>^{tag}
Date: Thu, 20 Jun 2013 11:03:39 -0700	[thread overview]
Message-ID: <7v4ncswtfo.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51C20FD1.4090203@bbn.com> (Richard Hansen's message of "Wed, 19 Jun 2013 16:08:49 -0400")

Richard Hansen <rhansen@bbn•com> writes:

> Barfing on non-tags is the feature this adds.  It's otherwise useless,
> just like <object>^{object} is useless except to barf when <object>
> 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 <rev>^{tag} is not the same as <rev>^{object} when <rev> 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 <rev>^{tag} can be used to make sure <rev> 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.

  reply	other threads:[~2013-06-20 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  1:39 [PATCH] peel_onion(): add support for <rev>^{tag} Richard Hansen
2013-06-19 18:38 ` Junio C Hamano
2013-06-19 20:08   ` Richard Hansen
2013-06-20 18:03     ` Junio C Hamano [this message]
2013-06-20 17:14 ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4ncswtfo.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=rhansen@bbn$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox