summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-10 20:52:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-10 20:52:27 (GMT)
commite53c7f8731f7fa66864397d3d1ec1ad7c035c23a (patch)
tree57b415de5fbe8afd9649d592aa7af9cd10854caa /t
parentdd19bca8270a5f91cd8643055d6316f83017ad72 (diff)
parentf5022b5fedb405c6bbb0b3e7c5a3a7f507279ef5 (diff)
downloadgit-e53c7f8731f7fa66864397d3d1ec1ad7c035c23a.zip
git-e53c7f8731f7fa66864397d3d1ec1ad7c035c23a.tar.gz
git-e53c7f8731f7fa66864397d3d1ec1ad7c035c23a.tar.bz2
Merge branch 'jk/log-graph-name-only'
"git log --graph" did not work well with "--name-only", even though other forms of "diff" output were handled correctly. * jk/log-graph-name-only: diff: print line prefix for --name-only output
Diffstat (limited to 't')
-rwxr-xr-xt/t4202-log.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 08ea725..48b55bf 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1212,6 +1212,54 @@ test_expect_success 'log --line-prefix="*** " --graph with diff and stats' '
test_i18ncmp expect actual.sanitized
'
+cat >expect <<-\EOF
+* reach
+|
+| A reach.t
+* Merge branch 'tangle'
+* Merge branch 'side'
+|\
+| * side-2
+|
+| A 2
+* Second
+|
+| A one
+* sixth
+
+ D a/two
+EOF
+
+test_expect_success 'log --graph with --name-status' '
+ git log --graph --format=%s --name-status tangle..reach >actual &&
+ sanitize_output <actual >actual.sanitized &&
+ test_cmp expect actual.sanitized
+'
+
+cat >expect <<-\EOF
+* reach
+|
+| reach.t
+* Merge branch 'tangle'
+* Merge branch 'side'
+|\
+| * side-2
+|
+| 2
+* Second
+|
+| one
+* sixth
+
+ a/two
+EOF
+
+test_expect_success 'log --graph with --name-only' '
+ git log --graph --format=%s --name-only tangle..reach >actual &&
+ sanitize_output <actual >actual.sanitized &&
+ test_cmp expect actual.sanitized
+'
+
test_expect_success 'dotdot is a parent directory' '
mkdir -p a/b &&
( echo sixth && echo fifth ) >expect &&