From c03fd1bd3a84a1923ef130f20ab0c01ec3d8c742 Mon Sep 17 00:00:00 2001 From: Josef Kufner Date: Sat, 12 Sep 2015 01:25:11 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- commit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index bc68ccbe69..ec6ecf8fff 100644 --- a/commit.h +++ b/commit.h @@ -156,6 +156,7 @@ struct pretty_print_context { * should not be counted on by callers. */ struct string_list in_body_headers; + int graph_width; }; struct userformat_want { -- cgit v1.2.1