aboutsummaryrefslogtreecommitdiff
path: root/t/t8008-blame-formats.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-05-09 09:34:42 -0400
committerJunio C Hamano <gitster@pobox.com>2011-05-09 15:27:50 -0700
commited747dd5216ba1fe6fa59da9585dcd6cced202bb (patch)
treeb3d07c9cecee5fb7f13c3249ba629fbabdf3e7c3 /t/t8008-blame-formats.sh
parente86226e34097ce22ed78a9e759564110f141dda0 (diff)
downloadgit-ed747dd5216ba1fe6fa59da9585dcd6cced202bb.tar.gz
git-ed747dd5216ba1fe6fa59da9585dcd6cced202bb.tar.xz
blame: add --line-porcelain output format
This is just like --porcelain, except that we always output the commit information for each line, not just the first time it is referenced. This can make quick and dirty scripts much easier to write; see the example added to the blame documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8008-blame-formats.sh')
-rwxr-xr-xt/t8008-blame-formats.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh
index 387d1a6b9..d15f8b3d4 100755
--- a/t/t8008-blame-formats.sh
+++ b/t/t8008-blame-formats.sh
@@ -68,4 +68,23 @@ test_expect_success 'blame --porcelain output' '
test_cmp expect actual
'
+cat >expect <<EOF
+$ID1 1 1 1
+$COMMIT1
+ a
+$ID2 2 2 3
+$COMMIT2
+ b
+$ID2 3 3
+$COMMIT2
+ c
+$ID2 4 4
+$COMMIT2
+ d
+EOF
+test_expect_success 'blame --line-porcelain output' '
+ git blame --line-porcelain file >actual &&
+ test_cmp expect actual
+'
+
test_done