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

Re: [PATCH 0/2] Log pretty format alignment improvements

From
Josef Kufner <josef@kufner.cz>
Date
Jun 17, 2016, 17:24 UTC
Message-ID
<dc9501ec-7684-ac35-7bac-f88fab707f18@kufner.cz>
In-Reply-To
<xmqqtwgt3s9z.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote, on 16.6.2016 20:25:
> "as long as >(N) can be used as Duy claims as a workaround to 
> get the original behaviour, it is good to allow using >|(N)
> for this new output format; I didn't check if >(N) does behave
> that way, though"
Yes, it can be used in such way.
Example:

$ git log --format='%<(10)%t%<(20)%h.' -n 1 004419a 9ca73ba .

$ git log --format='%<(10)%t%<|(30)%h.' -n 1 004419a 9ca73ba .

Notice that dot is at exactly same column, because 10 + 20 == 30.

The difference is when using --graph, because width of the graph is not known in advance. After the patch the graph width is included in %<(N). Original behavior is to not count with the graph width.

Previous: Junio C Hamano
Message 7 of 7 in “Log pretty format alignment improvements”
  1. 0/2 Log pretty format alignment improvementsNguyễn Thái Ngọc Duy, Jun 16, 2016
  2. 1/2 pretty: pass graph width to pretty formatting for use in '%>|(N)'Nguyễn Thái Ngọc Duy, Jun 16, 2016
  3. 2/2 pretty.c: support <direction>|(<negative number>) formsNguyễn Thái Ngọc Duy, Jun 16, 2016
  4. Junio C HamanoJun 16, 2016
  5. Duy NguyenJun 17, 2016
  6. Junio C HamanoJun 17, 2016
  7. Josef KufnerJun 17, 2016

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.