Re: [PATCH/RFC] pretty.c: add %O format specifier to format_commit_one()
- From
- Alexander Shishkin <ash@koowaldah.org>
- Date
- May 1, 2010, 17:56 UTC
- Message-ID
- <20100501175601.GB27062@shisha.kicks-ass.net>
- In-Reply-To
- <7vsk6b5yms.fsf@alter.siamese.dyndns.org>
On Sat, May 01, 2010 at 10:18:35 -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Alexander Shishkin <ash@koowaldah.org> writes: > > > This specifier represents the number of each commit in the output > > stream. > > I don't like this. What does such a number _mean_ in a non-linear > history?
My idea is to have something like
$ git log --pretty=oneline | nl | less -R
This is generally useful when my local topic branch contains more than 5 (or so) commits and I can't immediately see which one's which if I want to do a
$ git show HEAD~$n
to see what's inside, which is useful when reordering and/or squashing commits by an interactive rebase. So this %O gives me this $n quicker than counting.
> Also the next person who sees this will inevitably ask for %TOTAL to so > that the output can say [N/M], but that would mean the list has to be > limited and we cannot stream the output anymore.
Well, for me this kind of numbering only makes sense on a short part of the topmost history.
Regards, -- Alex