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, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: How to say HEAD~"all the way back - 1"
Date: Thu, 22 Feb 2007 12:59:23 -0800	[thread overview]
Message-ID: <7vr6shdi38.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <17885.64501.15547.465411@lisa.zopyra.com> (Bill Lear's message of "Thu, 22 Feb 2007 14:24:21 -0600")

Bill Lear <rael@zopyra.com> writes:

> % git log -p HEAD~"All the way back" update
>
> or something similar.

But in that use case "root" commit is not necessarily what you
wanted to say, isn't it?  It is more like "I want *earlier*
history, not latest ones as the command usually gives, of this
file".

$ git log --reverse -p HEAD -- update

would give you the changes that touch the path in the reverse
order than usual (I think this was merged post 1.5.0).

But my point is, you may happen to know it was in your root
commit, but that is a special case.  You may happen to know
other things to limit the output.  The timeperiod you made that
change (e.g. --until=2006-05-31), for example.

By the way, on the face of it:

$ git log --reverse -4 -p HEAD -- update

(or whatever number of commits you are interested in viewing)
might be closer to what you want to express, but the --reverse
option does not work like that, unfortunately for this
particular use case, because the way the semantics of
interaction between --reverse and --max-count is defined.

Given the above command line, the current implementation limits
the traversal to four items and then reverses the output,
instead of traversing normally as if --max-count limitation is
not there, reversing the result and then limiting the output to
four items, which would have made the sample command line above
a bit more useful.

But I would recommend against changing it.  Being able to view
the latest four commits in reverse is much more useful in
practice than being able to view the four commits at the
beginning of time in reverse.  Having both options is certainly
a possibility but I doubt it is worth it.

  reply	other threads:[~2007-02-22 20:59 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
2007-02-22 20:24   ` Bill Lear
2007-02-22 20:59     ` Junio C Hamano [this message]
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=7vr6shdi38.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --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.