]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3200-branch.sh
t3200: unset core.logallrefupdates when testing reflog creation
[thirdparty/git.git] / t / t3200-branch.sh
index c0ef946811dd534dfa5e704c992b6ab1fab82c35..ec56176093907d42d00860a97c654e70776f6c37 100755 (executable)
@@ -47,11 +47,11 @@ test_expect_success 'git branch HEAD should fail' '
 '
 
 cat >expect <<EOF
-$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000        branch: Created from master
+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000    branch: Created from master
 EOF
 test_expect_success 'git branch -l d/e/f should create a branch and a log' '
        GIT_COMMITTER_DATE="2005-05-26 23:30" \
-       git branch -l d/e/f &&
+       git -c core.logallrefupdates=false branch -l d/e/f &&
        test_path_is_file .git/refs/heads/d/e/f &&
        test_path_is_file .git/logs/refs/heads/d/e/f &&
        test_cmp expect .git/logs/refs/heads/d/e/f
@@ -234,34 +234,34 @@ test_expect_success 'git branch -M master2 master2 should work when master is ch
 
 test_expect_success 'git branch -v -d t should work' '
        git branch t &&
-       test_path_is_file .git/refs/heads/t &&
+       git rev-parse --verify refs/heads/t &&
        git branch -v -d t &&
-       test_path_is_missing .git/refs/heads/t
+       test_must_fail git rev-parse --verify refs/heads/t
 '
 
 test_expect_success 'git branch -v -m t s should work' '
        git branch t &&
-       test_path_is_file .git/refs/heads/t &&
+       git rev-parse --verify refs/heads/t &&
        git branch -v -m t s &&
-       test_path_is_missing .git/refs/heads/t &&
-       test_path_is_file .git/refs/heads/s &&
+       test_must_fail git rev-parse --verify refs/heads/t &&
+       git rev-parse --verify refs/heads/s &&
        git branch -d s
 '
 
 test_expect_success 'git branch -m -d t s should fail' '
        git branch t &&
-       test_path_is_file .git/refs/heads/t &&
+       git rev-parse refs/heads/t &&
        test_must_fail git branch -m -d t s &&
        git branch -d t &&
-       test_path_is_missing .git/refs/heads/t
+       test_must_fail git rev-parse refs/heads/t
 '
 
 test_expect_success 'git branch --list -d t should fail' '
        git branch t &&
-       test_path_is_file .git/refs/heads/t &&
+       git rev-parse refs/heads/t &&
        test_must_fail git branch --list -d t &&
        git branch -d t &&
-       test_path_is_missing .git/refs/heads/t
+       test_must_fail git rev-parse refs/heads/t
 '
 
 test_expect_success 'git branch --list -v with --abbrev' '
@@ -885,7 +885,7 @@ test_expect_success 'test --unset-upstream on a particular branch' '
        test_must_fail git config branch.my14.merge
 '
 
-test_expect_success '--set-upstream fails' '
+test_expect_success 'disabled option --set-upstream fails' '
     test_must_fail git branch --set-upstream origin/master
 '
 
@@ -901,7 +901,7 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups
 
 # Keep this test last, as it changes the current branch
 cat >expect <<EOF
-$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000        branch: Created from master
+$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000    branch: Created from master
 EOF
 test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '
        GIT_COMMITTER_DATE="2005-05-26 23:30" \