git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC] pretty.c: add %O format specifier to format_commit_one()

From
Jakub Narebski <jnareb@gmail.com>
Date
May 1, 2010, 19:39 UTC
Message-ID
<m3fx2bcsze.fsf@localhost.localdomain>
In-Reply-To
<20100501175601.GB27062@shisha.kicks-ass.net>
Alexander Shishkin <ash@koowaldah.org> writes:
Show 22 quoted lines
> On Sat, May 01, 2010 at 10:18:35 -0700, Junio C Hamano wrote:
> > 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.
Wouldn't somthing like
  git log --pretty=oneline | git name-rev --stdin | less -R
be good enough?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Alexander ShishkinNext: Jeff King
Message 4 of 5 in “pretty.c: add %O format specifier to format_commit_one()”
  1. pretty.c: add %O format specifier to format_commit_one()Alexander Shishkin, May 1, 2010
  2. Junio C HamanoMay 1, 2010
  3. Alexander ShishkinMay 1, 2010
  4. Jakub NarebskiMay 1, 2010
  5. Jeff KingMay 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.