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.