summaryrefslogtreecommitdiff
path: root/t/t4041-diff-submodule-option.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-07-29 13:56:48 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-07-30 12:30:08 -0700
commitb9c7d6e4330e3dcdb3b3e5f013e5667e47555c95 (patch)
tree3b2dac6b6d40dfcf8973f6eb74d062c8eaed13c1 /t/t4041-diff-submodule-option.sh
parentpretty: treat "--format=" as an empty userformat (diff)
downloadtgif-b9c7d6e4330e3dcdb3b3e5f013e5667e47555c95.tar.xz
pretty: make empty userformats truly empty
If the user provides an empty format with "--format=", we end up putting in extra whitespace that the user cannot prevent. This comes from two places: 1. If the format is missing a terminating newline, we add one automatically. This makes sense for --format=%h, but not for a truly empty format. 2. We add an extra newline between the pretty-printed format and a diff or diffstat. If the format is empty, there's no point in doing so if there's nothing to separate. With this patch, one can get a diff with no other cruft out of "diff-tree --format= $commit". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4041-diff-submodule-option.sh')
0 files changed, 0 insertions, 0 deletions