On Mon, Jul 30, 2012 at 11:45 AM, Junio C Hamano <gits...@pobox.com> wrote:
>         git show -s ':/^t1100-.*: Fix an interm'

That doesn't work for me (git as per Fedora 18 rpms) in
git.git. But the idea is sound -- git can give you the sha1 trivially.
You don't need additional glue.

But any ref definition can be turned into a sha1 with this snippet:

    git show --pretty=format:%H HEAD

If you want to get the last 10 sha1s, use the same "pretty" with git log

   git log --pretty=format:%H HEAD | head

This is all predicated on passing the info to something else. For git
commands, you can always use the rich ref notation git supports.


 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to