diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-04-06 14:48:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-06 14:49:33 -0700 |
commit | 635530a2fcd4bb3714452403f341f1317ae9c9f6 (patch) | |
tree | 5beeafeed8200f320d8463a7ba384a96e6ee821b /t/t4202-log.sh | |
parent | 8a3d203bd02bec48a02557961899d81da172fa23 (diff) | |
download | git-635530a2fcd4bb3714452403f341f1317ae9c9f6.tar.gz |
log --pretty/--oneline: ignore log.decorate
Many scripts, most notably gitk, rely on output from the log family of
command not to be molested by random user configuration. This is
especially true when --pretty=raw is given.
Just like we disable notes output unless the command line explicitly
asks for --show-notes, disable the decoration code unless --decorate is
given explicitly from the command line and --pretty or --oneline is
given.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 2230e606ed..166de4479c 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -390,50 +390,62 @@ test_expect_success 'log --graph with merge' ' test_expect_success 'log.decorate configuration' ' git config --unset-all log.decorate || : - git log --oneline >expect.none && - git log --oneline --decorate >expect.short && - git log --oneline --decorate=full >expect.full && + git log >expect.none && + git log --decorate >expect.short && + git log --decorate=full >expect.full && + git log --oneline >expect.oneline && echo "[log] decorate" >>.git/config && - git log --oneline >actual && + git log >actual && test_cmp expect.short actual && + git log --oneline >actual && + test_cmp expect.oneline actual && git config --unset-all log.decorate && git config log.decorate true && - git log --oneline >actual && + git log >actual && test_cmp expect.short actual && - git log --oneline --decorate=full >actual && + git log --decorate=full >actual && test_cmp expect.full actual && - git log --oneline --decorate=no >actual && + git log --decorate=no >actual && test_cmp expect.none actual && + git log --oneline >actual && + test_cmp expect.oneline actual && git config --unset-all log.decorate && git config log.decorate no && - git log --oneline >actual && + git log >actual && test_cmp expect.none actual && - git log --oneline --decorate >actual && + git log --decorate >actual && test_cmp expect.short actual && - git log --oneline --decorate=full >actual && + git log --decorate=full >actual && test_cmp expect.full actual && + git log --oneline >actual && + test_cmp expect.oneline actual && git config --unset-all log.decorate && git config log.decorate short && - git log --oneline >actual && + git log >actual && test_cmp expect.short actual && - git log --oneline --no-decorate >actual && + git log --no-decorate >actual && test_cmp expect.none actual && - git log --oneline --decorate=full >actual && + git log --decorate=full >actual && test_cmp expect.full actual && + git log --oneline >actual && + test_cmp expect.oneline actual && git config --unset-all log.decorate && git config log.decorate full && - git log --oneline >actual && + git log >actual && test_cmp expect.full actual && - git log --oneline --no-decorate >actual && + git log --no-decorate >actual && test_cmp expect.none actual && - git log --oneline --decorate >actual && + git log --decorate >actual && test_cmp expect.short actual + git log --oneline >actual && + test_cmp expect.oneline actual && + : ' test_done |