diff options
Diffstat (limited to 't/t4202-log.sh')
| -rwxr-xr-x | t/t4202-log.sh | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 51f7beb59f..05cee9e41b 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -134,6 +134,12 @@ test_expect_success 'diff-filter=D' ' ' +test_expect_success 'all-negative filter' ' + git log --no-renames --format=%s --diff-filter=d HEAD >actual && + printf "%s\n" fifth fourth third second initial >expect && + test_cmp expect actual +' + test_expect_success 'diff-filter=R' ' git log -M --pretty="format:%s" --diff-filter=R HEAD >actual && @@ -486,10 +492,16 @@ test_expect_success !FAIL_PREREQS 'log with various grep.patternType configurati ) ' -for cmd in show whatchanged reflog format-patch +cmds="show reflog format-patch" +if test_have_prereq !WITH_BREAKING_CHANGES +then + cmds="$cmds whatchanged" +fi +for cmd in $cmds do case "$cmd" in format-patch) myarg="HEAD~.." ;; + whatchanged) myarg=--i-still-use-this ;; *) myarg= ;; esac @@ -1201,20 +1213,27 @@ test_expect_success 'reflog is expected format' ' test_cmp expect actual ' -test_expect_success 'whatchanged is expected format' ' +test_expect_success !WITH_BREAKING_CHANGES 'whatchanged is expected format' ' + whatchanged="whatchanged --i-still-use-this" && git log --no-merges --raw >expect && - git whatchanged >actual && + git $whatchanged >actual && test_cmp expect actual ' test_expect_success 'log.abbrevCommit configuration' ' + whatchanged="whatchanged --i-still-use-this" && + git log --abbrev-commit >expect.log.abbrev && git log --no-abbrev-commit >expect.log.full && git log --pretty=raw >expect.log.raw && git reflog --abbrev-commit >expect.reflog.abbrev && git reflog --no-abbrev-commit >expect.reflog.full && - git whatchanged --abbrev-commit >expect.whatchanged.abbrev && - git whatchanged --no-abbrev-commit >expect.whatchanged.full && + + if test_have_prereq !WITH_BREAKING_CHANGES + then + git $whatchanged --abbrev-commit >expect.whatchanged.abbrev && + git $whatchanged --no-abbrev-commit >expect.whatchanged.full + fi && test_config log.abbrevCommit true && @@ -1231,10 +1250,13 @@ test_expect_success 'log.abbrevCommit configuration' ' git reflog --no-abbrev-commit >actual && test_cmp expect.reflog.full actual && - git whatchanged >actual && - test_cmp expect.whatchanged.abbrev actual && - git whatchanged --no-abbrev-commit >actual && - test_cmp expect.whatchanged.full actual + if test_have_prereq !WITH_BREAKING_CHANGES + then + git $whatchanged >actual && + test_cmp expect.whatchanged.abbrev actual && + git $whatchanged --no-abbrev-commit >actual && + test_cmp expect.whatchanged.full actual + fi ' test_expect_success '--abbrev-commit with core.abbrev=false' ' |
