t1400: set core.logAllRefUpdates in "logged by touch" tests
[gitweb.git] / t / t1400-update-ref.sh
index fde5b98af62370460b262ba91086a68788e0469b..be8b113b1a16bab44fb2e796369f5b4bac5bd281 100755 (executable)
@@ -260,17 +260,20 @@ rm -f .git/$m
 rm -f .git/logs/refs/heads/master
 test_expect_success \
        "create $m (logged by touch)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:30" \
+       'test_config core.logAllRefUpdates false &&
+        GIT_COMMITTER_DATE="2005-05-26 23:30" \
         git update-ref --create-reflog HEAD '"$A"' -m "Initial Creation" &&
         test '"$A"' = $(cat .git/'"$m"')'
 test_expect_success \
        "update $m (logged by touch)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:31" \
+       'test_config core.logAllRefUpdates false &&
+        GIT_COMMITTER_DATE="2005-05-26 23:31" \
         git update-ref HEAD'" $B $A "'-m "Switch" &&
         test '"$B"' = $(cat .git/'"$m"')'
 test_expect_success \
        "set $m (logged by touch)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:41" \
+       'test_config core.logAllRefUpdates false &&
+        GIT_COMMITTER_DATE="2005-05-26 23:41" \
         git update-ref HEAD'" $A &&
         test $A"' = $(cat .git/'"$m"')'
 
@@ -311,24 +314,22 @@ test_expect_success \
        "test_cmp expect .git/logs/$m"
 rm -rf .git/$m .git/logs expect
 
-test_expect_success \
-       'enable core.logAllRefUpdates' \
-       'git config core.logAllRefUpdates true &&
-        test true = $(git config --bool --get core.logAllRefUpdates)'
-
 test_expect_success \
        "create $m (logged by config)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:32" \
+       'test_config core.logAllRefUpdates true &&
+        GIT_COMMITTER_DATE="2005-05-26 23:32" \
         git update-ref HEAD'" $A "'-m "Initial Creation" &&
         test '"$A"' = $(cat .git/'"$m"')'
 test_expect_success \
        "update $m (logged by config)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:33" \
+       'test_config core.logAllRefUpdates true &&
+        GIT_COMMITTER_DATE="2005-05-26 23:33" \
         git update-ref HEAD'" $B $A "'-m "Switch" &&
         test '"$B"' = $(cat .git/'"$m"')'
 test_expect_success \
        "set $m (logged by config)" \
-       'GIT_COMMITTER_DATE="2005-05-26 23:43" \
+       'test_config core.logAllRefUpdates true &&
+        GIT_COMMITTER_DATE="2005-05-26 23:43" \
         git update-ref HEAD '"$A &&
         test $A"' = $(cat .git/'"$m"')'