Code

Add testcase for format-patch --subject-prefix (take 3)
[git.git] / t / t1400-update-ref.sh
index b3b920edb146c3ad1ed8c795150c162a9e3f0e17..d0aba2c2ae1fbd5f5282de1a0ee7ed8b87b80faa 100755 (executable)
@@ -30,11 +30,8 @@ rm -f .git/$m
 test_expect_success \
        "fail to create $n" \
        "touch .git/$n_dir
-        git-update-ref $n $A >out 2>err
-        test "'$? = 1 &&
-        test "" = "$(cat out)" &&
-        grep "error: unable to resolve reference" err &&
-        grep '"$n err"
+        git-update-ref $n $A >out 2>err"'
+        test $? != 0'
 rm -f .git/$n_dir out err
 
 test_expect_success \
@@ -66,8 +63,8 @@ test_expect_failure \
        "test $B"' = $(cat .git/'"$m"')'
 rm -f .git/$m
 
-mkdir -p .git/logs/refs/heads
-touch .git/logs/refs/heads/master
+: a repository with working tree always has reflog these days...
+: >.git/logs/refs/heads/master
 test_expect_success \
        "create $m (logged by touch)" \
        'GIT_COMMITTER_DATE="2005-05-26 23:30" \
@@ -96,8 +93,8 @@ rm -rf .git/$m .git/logs expect
 
 test_expect_success \
        'enable core.logAllRefUpdates' \
-       'git-repo-config core.logAllRefUpdates true &&
-        test true = $(git-repo-config --bool --get core.logAllRefUpdates)'
+       'git-config core.logAllRefUpdates true &&
+        test true = $(git-config --bool --get core.logAllRefUpdates)'
 
 test_expect_success \
        "create $m (logged by config)" \
@@ -141,19 +138,19 @@ test_expect_success \
        'rm -f o e
         git-rev-parse --verify "master@{May 25 2005}" >o 2>e &&
         test '"$C"' = $(cat o) &&
-        test "warning: Log .git/logs/'"$m only goes back to $ed"'." = "$(cat e)"'
+        test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
 test_expect_success \
        "Query master@{2005-05-25} (before history)" \
        'rm -f o e
         git-rev-parse --verify master@{2005-05-25} >o 2>e &&
         test '"$C"' = $(cat o) &&
-        echo test "warning: Log .git/logs/'"$m only goes back to $ed"'." = "$(cat e)"'
+        echo test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
 test_expect_success \
        'Query "master@{May 26 2005 23:31:59}" (1 second before history)' \
        'rm -f o e
         git-rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
         test '"$C"' = $(cat o) &&
-        test "warning: Log .git/logs/'"$m only goes back to $ed"'." = "$(cat e)"'
+        test "warning: Log for '\''master'\'' only goes back to $ed." = "$(cat e)"'
 test_expect_success \
        'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \
        'rm -f o e