git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jan Engelhardt <jengelh@inai.de>,
	Thomas Badie <thomas.badie@gmail.com>,
	git@vger.kernel.org
Subject: Re: A new way to get a sha1?
Date: Mon, 30 Jul 2012 20:40:54 +0200	[thread overview]
Message-ID: <m2hasprt1l.fsf@igel.home> (raw)
In-Reply-To: <CACPiFCKxYdF8G33myfjOXU31cDWrfrtedve8m89tH_tfOCZ4ng@mail.gmail.com> (Martin Langhoff's message of "Mon, 30 Jul 2012 14:16:30 -0400")

Martin Langhoff <martin.langhoff@gmail.com> writes:

> But any ref definition can be turned into a sha1 with this snippet:
>
>     git show --pretty=format:%H HEAD

      git rev-parse HEAD

> If you want to get the last 10 sha1s, use the same "pretty" with git log
>
>    git log --pretty=format:%H HEAD | head

     git rev-list -n 10 HEAD

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2012-07-30 18:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 12:11 A new way to get a sha1? Thomas Badie
2012-07-30 12:28 ` Jan Engelhardt
2012-07-30 15:45   ` Junio C Hamano
2012-07-30 16:57     ` Thomas Badie
2012-07-30 18:16     ` Martin Langhoff
2012-07-30 18:29       ` Junio C Hamano
2012-07-30 18:42         ` Martin Langhoff
2012-07-30 18:40       ` Andreas Schwab [this message]
2012-07-30 16:40   ` Thomas Badie
2012-07-30 16:51     ` Jeff King
2012-07-30 17:33       ` Thomas Badie
2012-07-30 17:55         ` Andreas Schwab
2012-07-30 12:41 ` Sitaram Chamarty
2012-07-30 16:49   ` Thomas Badie
2012-07-30 15:57 ` Thomas Rast
2012-07-30 17:17   ` Thomas Badie

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=m2hasprt1l.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jengelh@inai.de \
    --cc=martin.langhoff@gmail.com \
    --cc=thomas.badie@gmail.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;
as well as URLs for NNTP newsgroup(s).