Re: How to say HEAD~"all the way back - 1"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Lear <rael@xxxxxxxxxx> 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.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]