summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-04-11 00:21:51 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-11 00:21:51 -0700
commitd9758cf81cd8af42a7ab55dc3c1a889d9ddd3f81 (patch)
treeadf2a41ed8873a16e8f14dc9845a0ba840ccf8b0 /t
parentMerge branch 'ab/ref-filter-no-contains' (diff)
parentlog: if --decorate is not given, default to --decorate=auto (diff)
downloadtgif-d9758cf81cd8af42a7ab55dc3c1a889d9ddd3f81.tar.xz
Merge branch 'ah/log-decorate-default-to-auto'
The default behaviour of "git log" in an interactive session has been changed to enable "--decorate". * ah/log-decorate-default-to-auto: log: if --decorate is not given, default to --decorate=auto
Diffstat (limited to 't')
-rwxr-xr-xt/t4202-log.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 48b55bfd27..f577990716 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -4,6 +4,7 @@ test_description='git log'
. ./test-lib.sh
. "$TEST_DIRECTORY/lib-gpg.sh"
+. "$TEST_DIRECTORY/lib-terminal.sh"
test_expect_success setup '
@@ -520,7 +521,7 @@ test_expect_success 'log --graph with merge' '
'
test_expect_success 'log.decorate configuration' '
- git log --oneline >expect.none &&
+ git log --oneline --no-decorate >expect.none &&
git log --oneline --decorate >expect.short &&
git log --oneline --decorate=full >expect.full &&
@@ -576,6 +577,13 @@ test_expect_success 'log.decorate configuration' '
'
+test_expect_success TTY 'log output on a TTY' '
+ git log --oneline --decorate >expect.short &&
+
+ test_terminal git log --oneline >actual &&
+ test_cmp expect.short actual
+'
+
test_expect_success 'reflog is expected format' '
git log -g --abbrev-commit --pretty=oneline >expect &&
git reflog >actual &&