pretty: pass graph width to pretty formatting for use in '%>|(N)'
commit3ad87c807c2b6cbfbdfb2c78412781ecc7db593d
authorJosef Kufner <josef@kufner.cz>
Thu, 16 Jun 2016 13:18:37 +0000 (16 20:18 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Jun 2016 18:43:36 +0000 (16 11:43 -0700)
treee7b1ea6c6d9fa662be89d963317532a5e9663c63
parent05219a1276341e72d8082d76b7f5ed394b7437a4
pretty: pass graph width to pretty formatting for use in '%>|(N)'

Pass graph width to pretty formatting, to make N in '%>|(N)'
include columns consumed by graph rendered when --graph option
is in use.

For example, in the output of

  git log --all --graph --pretty='format: [%>|(20)%h] %ar%d'

this change will make all commit hashes align at 20th column from
the edge of the terminal, not from the edge of the graph.

Signed-off-by: Josef Kufner <josef@kufner.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.h
graph.c
graph.h
log-tree.c
pretty.c
t/t4205-log-pretty-formats.sh