diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2016-10-20 13:41:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-20 14:44:37 -0700 |
commit | 98985c6911ca0d475ae7b4e5401e6eae58ed8489 (patch) | |
tree | de37aa7e7a3a40933390cf53688395f79b75bd76 /gitk-git | |
parent | diff: teach diff to display submodule difference with an inline diff (diff) | |
download | tgif-98985c6911ca0d475ae7b4e5401e6eae58ed8489.tar.xz |
rev-list: use hdr_termination instead of a always using a newline
When adding support for prefixing output of log and other commands using
--line-prefix, commit 660e113ce118 ("graph: add support for
--line-prefix on all graph-aware output", 2016-08-31) accidentally
broke rev-list --header output.
In order to make the output appear with a line-prefix, the flow was
changed to always use the graph subsystem for display. Unfortunately
the graph flow in rev-list did not use info->hdr_termination as it was
assumed that graph output would never need to putput NULs.
Since we now always use the graph code in order to handle the case of
line-prefix, simply replace putchar('\n') with
putchar(info->hdr_termination) which will correct this issue.
Add a test for the --header case to make sure we don't break it in the
future.
Reported-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitk-git')
0 files changed, 0 insertions, 0 deletions