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

Request for examples on git log --format:tformat

From
DLDaniel Lo <wilburlo@gmail.com>
Date
Sep 28, 2018, 18:29 UTC
Message-ID
<CAOeX3KXASgnyVcZuTAjyXLgnZpeA1FD3XXvSoRd11b9V9jpGFg@mail.gmail.com>
Greetings,

I was reviewing the tformat parameters on: https://git-scm.com/docs/git-log (middle of the page).

Specifically: %<|(<N>): make the next placeholder take at least until
Nth columns, padding spaces on the right if necessary

I found the instructions regard space formatting to be very confusing. An example would be helpful to illustrate what the proper space formatting syntax is:

Ex: git log --format="tformat:%h %<(15)%an %s"

0123456 Author Name Commit message - author name is formatted to be padded with space to occupy at least 15 characters

All of the special symbols %<|(<>) made me confused to what was required and what was describing the syntax.

Thank you!
-daniel
-- 
Percy Shelley's poem "Ozymandias" is also a good argument for refactoring code.
http://en.wikipedia.org/wiki/Ozymandias
Next: Jeff King
Message 1 of 2 in “Request for examples on git log --format:tformat”
  1. Daniel LoSep 28, 2018
  2. Jeff KingSep 29, 2018

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.