From: Junio C Hamano <gitster@pobox.com>
To: Tim Hockin <thockin@google.com>
Cc: git@vger.kernel.org
Subject: Re: rev-parse: -- is sometimes a flag and sometimes an arg?
Date: Sat, 20 Aug 2022 17:54:40 -0700 [thread overview]
Message-ID: <xmqqzgfyh0vj.fsf@gitster.g> (raw)
In-Reply-To: <CAO_RewaZHL34WBaoXVyXh6ZNVuG+fi5uGUbpRMsc9N=orHzx1Q@mail.gmail.com> (Tim Hockin's message of "Sat, 20 Aug 2022 17:39:36 -0700")
Tim Hockin <thockin@google.com> writes:
> Sorry, I assumed it was clear, but that was dumb of me.
>
> I have a string - might be a tag name, might be a branch name, might
> be a SHA (complete or partial). I want to resolve that into a
> canonical SHA.
"git rev-parse --verify string" would insist that 'string' is an
object name and show it as an object name to the standard output, or
gives an error message and exits with a non-zero status.
"git rev-parse --help" has some more elaborate examples in its
EXAMPLES section.
next prev parent reply other threads:[~2022-08-21 0:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 22:39 rev-parse: -- is sometimes a flag and sometimes an arg? Tim Hockin
2022-08-20 22:59 ` Junio C Hamano
2022-08-21 0:31 ` Tim Hockin
2022-08-21 0:36 ` Junio C Hamano
2022-08-21 0:39 ` Tim Hockin
2022-08-21 0:54 ` Junio C Hamano [this message]
2022-08-23 0:51 ` brian m. carlson
2022-08-23 17:45 ` Tim Hockin
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=xmqqzgfyh0vj.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=thockin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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