summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff-tree_-c_--stat_master
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2009-07-18 06:14:37 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-07-19 11:04:18 -0700
commitae03ee644ec52f2aa2769dfd4929c5ff85c2a899 (patch)
tree46184da6b74ad5627bc4c5a08e5abced328fd508 /t/t4013/diff.diff-tree_-c_--stat_master
parentshow: suppress extra newline when showing annotated tag (diff)
downloadtgif-ae03ee644ec52f2aa2769dfd4929c5ff85c2a899.tar.xz
show: add space between multiple items
When showing an annotated tag, "git show" will always display the pointed-to object. However, it didn't separate the two with whitespace, making it more difficult to notice where the new object started. For example: $ git tag -m 'my message' foo $ git show foo tag foo Tagger: Jeff King <peff@peff.net> Date: Fri Jul 17 18:46:25 2009 -0400 my message commit 41cabf8fed2694ba33e01d64f9094f2fc5e5805a Author: Jeff King <peff@peff.net> Date: Thu Jul 16 17:31:34 2009 -0400 ... This patch respects and sets the rev.shown_one member to prepend a blank line before showing a second item. We use this member of rev_info instead of a local flag, because the log_tree_commit we call into for showing commits already respects and sets that flag. Meaning that everything will be spaced properly if you intermix commits and tags, like: $ git show v1.6.3 v1.6.2 HEAD In that case, a single blank line will separate the first tag, the commit it points to, the second tag, the commit that one points to, and the final commit. While we're at it, let's also support trees, so that even something as crazy as $ git show HEAD^{tree} HEAD~1^{tree} HEAD will also be spaced in an easy-to-read way. However, we intentionally do _not_ insert blank lines for blobs, so that specifying multiple blobs gives a strict concatenation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_-c_--stat_master')
0 files changed, 0 insertions, 0 deletions