diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:20 -0700 |
commit | 2dded96052114c7b902d90f80f75a30eb64d860a (patch) | |
tree | f8c7116edec1c72755cf3f1f62176a9acbc5a2ec /t/t4202-log.sh | |
parent | Merge branch 'gp/status-rebase-i-info' (diff) | |
parent | log: add "log.follow" configuration variable (diff) | |
download | tgif-2dded96052114c7b902d90f80f75a30eb64d860a.tar.xz |
Merge branch 'dt/log-follow-config'
Add a new configuration variable to enable "--follow" automatically
when "git log" is run with one pathspec argument.
* dt/log-follow-config:
log: add "log.follow" configuration variable
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 1b2e981a00..35d2d7c221 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -146,7 +146,30 @@ test_expect_success 'git log --follow' ' actual=$(git log --follow --pretty="format:%s" ichi) && expect=$(echo third ; echo second ; echo initial) && verbose test "$actual" = "$expect" +' + +test_expect_success 'git config log.follow works like --follow' ' + test_config log.follow true && + actual=$(git log --pretty="format:%s" ichi) && + expect=$(echo third ; echo second ; echo initial) && + verbose test "$actual" = "$expect" +' +test_expect_success 'git config log.follow does not die with multiple paths' ' + test_config log.follow true && + git log --pretty="format:%s" ichi ein +' + +test_expect_success 'git config log.follow does not die with no paths' ' + test_config log.follow true && + git log -- +' + +test_expect_success 'git config log.follow is overridden by --no-follow' ' + test_config log.follow true && + actual=$(git log --no-follow --pretty="format:%s" ichi) && + expect="third" && + verbose test "$actual" = "$expect" ' cat > expect << EOF |