All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: How to say HEAD~"all the way back - 1"
Date: Thu, 22 Feb 2007 12:12:45 -0800	[thread overview]
Message-ID: <7vodnmdk8y.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <17885.60477.53356.123095@lisa.zopyra.com> (Bill Lear's message of "Thu, 22 Feb 2007 13:17:17 -0600")

Bill Lear <rael@zopyra.com> writes:

> Git "indexing" of commits has a way to "go back":
>
> % git diff HEAD~3
>
> Can I say "all the way back", or "all the way back - 1" somehow?

Sorry, there is no such shorthand, but you could obviously say:

	$ git rev-list --parents HEAD | grep -v ' '

A way to find the root commit seems to be one of the things
people new to git want at least once, once they start futzing
with the tool.  But I suspect that is only because they need
that information to see how the tool works (say "what different
output would I get out of 'git show $commit' for root and other
commits?"), and not because they need that information for any
real life use.

Really, what useful purpose does it serve for you to find out
the root commit, OTHER THAN being able to say "the development
history of this project starts at this commit"?

  parent reply	other threads:[~2007-02-22 20:12 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
2007-02-22 20:12 ` Junio C Hamano [this message]
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=7vodnmdk8y.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.