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

git pretty format: "%+b" not working with "%w" in front of it?

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Mar 15, 2017, 14:08 UTC
Message-ID
<CAHd499BP-iaXJDNg+4RWB9GaQ1xW8ZnH0oysWSa7u_DCSWFFDg@mail.gmail.com>
I have the following log:
$ git log
commit 7ffb909bb8f38607e3d6d9f3504a66ca978f0ac2
Author: Robert Dailey <robert@ziosk.com>
Date:   Mon Dec 12 11:01:00 2016 -0600
    Add initial skeleton files & a few interfaces for new kizi/sc16 stuff
    This is still FAR from complete....

I want to generate changelogs, using github markdown list format. I tried doing that using this command:

$ git log --pretty=format:"* %s%n%w(100,2,2)%+b"
However, the 2nd newline is not inserted:
* Add initial skeleton files & a few interfaces for new kizi/sc16 stuff
   This is still FAR from complete....
The format I'm expecting is:
* Add initial skeleton files & a few interfaces for new kizi/sc16 stuff
  This is still FAR from complete....

This seems to work, but I do not get the 2-space indentation required to continue text on the current list item:

$ git log --pretty=format:"* %s%n%+b"
* Add initial skeleton files & a few interfaces for new kizi/sc16 stuff
This is still FAR from complete....

So why isn't it working when I use %w before the %+b? Am I doing something wrong? Note I'm using git version 2.10 on Windows through Git Bash.

Next: Jeff King
Message 1 of 2 in “git pretty format: "%+b" not working with "%w" in front of it?”
  1. Robert DaileyMar 15, 2017
  2. Jeff KingMar 15, 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.