format-patch: introduce format.useAutoBase configuration
[gitweb.git] / t / t4202-log.sh
index 19277dd3618019a97ef0631cc4a808f5e5bcc653..cb82eb7e66b4feb24086407019a812f46b715a34 100755 (executable)
@@ -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
@@ -885,4 +908,33 @@ test_expect_success 'log diagnoses bogus HEAD' '
        test_i18ngrep broken stderr
 '
 
+test_expect_success 'set up --source tests' '
+       git checkout --orphan source-a &&
+       test_commit one &&
+       test_commit two &&
+       git checkout -b source-b HEAD^ &&
+       test_commit three
+'
+
+test_expect_success 'log --source paints branch names' '
+       cat >expect <<-\EOF &&
+       09e12a9 source-b three
+       8e393e1 source-a two
+       1ac6c77 source-b one
+       EOF
+       git log --oneline --source source-a source-b >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'log --source paints tag names' '
+       git tag -m tagged source-tag &&
+       cat >expect <<-\EOF &&
+       09e12a9 source-tag three
+       8e393e1 source-a two
+       1ac6c77 source-tag one
+       EOF
+       git log --oneline --source source-tag source-a >actual &&
+       test_cmp expect actual
+'
+
 test_done