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

Re: git log --graph and root commits

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Feb 13, 2009, 14:56 UTC
Message-ID
<slrngpb2gl.rhg.sitaramc@sitaramc.homelinux.net>
In-Reply-To
<alpine.DEB.1.00.0902131237490.10279@pacific.mpi-cbg.de>
On 2009-02-13, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Fri, 13 Feb 2009, Sitaram Chamarty wrote:
>> I was wondering if there was any way, when using 'git log
>> --graph --pretty=oneline' to get a different marker (perhaps
>> an underscore) for a root commit.
> Is it not enough that the line ends?  That is a pretty obvious visual 
> marker for me that this is a root commit.  But I see that you are _asking_ 
> for the lines not to be shown, by using --pretty=oneline.
Yes; I'm short on vertical space here.
> You might be interested in this instead:
>
> 	git log --graph --pretty=format:'%h %s%n'
It doubles the height requirement, but you gave me an idea:
    git log --graph --pretty=tformat:'%h <%p> %s' --all |
        perl -pe '$_.="----\n" if /<>/; s/<.*?> //'
Thanks for pointing me in the right direction.
Regards,
Sitaram
Previous: Johannes SchindelinNext: Jakub Narebski
Message 3 of 5 in “git log --graph and root commits”
  1. Sitaram ChamartyFeb 13, 2009
  2. Johannes SchindelinFeb 13, 2009
  3. Sitaram ChamartyFeb 13, 2009
  4. Jakub NarebskiFeb 13, 2009
  5. Sitaram ChamartyFeb 14, 2009

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.