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

Re: Incorrect pipe for git log graph when using --name-status option

From
Jeff King <peff@peff.net>
Date
Feb 13, 2017, 21:16 UTC
Message-ID
<20170213211653.x3huwmzprvmm3yxj@sigill.intra.peff.net>
In-Reply-To
<CAM_JFCwN+o54mJ1XJ3rSKnXgPx3wt_i=fd8ZSGpcL-fSegQ=Ow@mail.gmail.com>
On Mon, Feb 13, 2017 at 12:55:07PM -0800, hIpPy wrote:
> I think that requiring to end custom formats with %n with options
> is not good. So I think this is a bug.
Yes, you don't normally need to do that.

I think the problem is specifically related to the "terminator" versus "separator" semantics. Try:

  git log --graph --name-status --pretty=format:%h
versus:
  git log --graph --name-status --pretty=tformat:%h

The latter works fine. The problem seems to happen with all diff formats, so I think the issue is that git is not aggressive enough about inserting the newline at the right spot when using separator mode.

-Peff
Previous: hIpPyNext: Junio C Hamano
Message 4 of 8 in “Incorrect pipe for git log graph when using --name-status option”
  1. hIpPyFeb 13, 2017
  2. Junio C HamanoFeb 13, 2017
  3. hIpPyFeb 13, 2017
  4. Jeff KingFeb 13, 2017
  5. Junio C HamanoFeb 13, 2017
  6. Jeff KingFeb 13, 2017
  7. hIpPyFeb 13, 2017
  8. Jeff KingFeb 13, 2017

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.