git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Bill Lear <rael@zopyra.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: How to say HEAD~"all the way back - 1"
Date: Sat, 24 Feb 2007 01:30:18 -0800	[thread overview]
Message-ID: <7virdrzyvp.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 17887.10938.419368.304761@lisa.zopyra.com

Bill Lear <rael@zopyra.com> writes:

> Exactly what I was after.  Something like:
>
> % git diff HEAD~-1
>
> or
>
> % git diff ^HEAD~0
>
> whatever ...

<amusement>

        $ git rev-parse HEAD~4096
        fatal: ambiguous argument 'HEAD~4096': unknown revision or path ...
        $ git rev-parse HEAD~2048
        231af8322...
        $ git rev-parse HEAD~3072
        723c31fea...
        $ git rev-parse HEAD~3584
        ....
        $ git rev-parse HEAD_3952
        e83c5163316f89bfbde7d9ab23ca2e25604af290

</amusement>

If you somehow need to know where the root is all the time, you
could do the above once and say:

	$ git tag root-commit e83c5163316f89bfbde7d9ab23ca2e25604af290

  reply	other threads:[~2007-02-24  9:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 19:17 How to say HEAD~"all the way back - 1" Bill Lear
2007-02-22 19:36 ` Petr Baudis
2007-02-23 17:52   ` Jakub Narebski
2007-02-23 17:56     ` Bill Lear
2007-02-24  9:30       ` Junio C Hamano [this message]
2007-02-22 20:12 ` Junio C Hamano
2007-02-22 20:24   ` Bill Lear
2007-02-22 20:59     ` Junio C Hamano
2007-02-22 20:47   ` J. Bruce Fields
2007-02-22 20:53     ` Johannes Schindelin

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=7virdrzyvp.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=rael@zopyra.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).