summaryrefslogtreecommitdiff
path: root/t/t1400-update-ref.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1400-update-ref.sh')
-rwxr-xr-xt/t1400-update-ref.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 0d4f73acaa..cf58cf025c 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -4,9 +4,6 @@
#
test_description='Test git update-ref and basic ref logging'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
. ./test-lib.sh
Z=$ZERO_OID
@@ -321,8 +318,9 @@ $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000 Switch
$B $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150860 +0000
EOF
test_expect_success "verifying $m's log (logged by touch)" '
- test_when_finished "rm -rf .git/$m .git/logs expect" &&
- test_cmp expect .git/logs/$m
+ test_when_finished "git update-ref -d $m && rm -rf .git/logs actual expect" &&
+ test-tool ref-store main for-each-reflog-ent $m >actual &&
+ test_cmp actual expect
'
test_expect_success "create $m (logged by config)" '
@@ -350,8 +348,9 @@ $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 +0000 Switch
$B $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 +0000
EOF
test_expect_success "verifying $m's log (logged by config)" '
- test_when_finished "rm -f .git/$m .git/logs/$m expect" &&
- test_cmp expect .git/logs/$m
+ test_when_finished "git update-ref -d $m && rm -rf .git/logs actual expect" &&
+ test-tool ref-store main for-each-reflog-ent $m >actual &&
+ test_cmp actual expect
'
test_expect_success 'set up for querying the reflog' '
@@ -467,7 +466,8 @@ $h_OTHER $h_FIXED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151040 +0000 co
$h_FIXED $h_MERGED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151100 +0000 commit (merge): Merged initial commit and a later commit.
EOF
test_expect_success 'git commit logged updates' '
- test_cmp expect .git/logs/$m
+ test-tool ref-store main for-each-reflog-ent $m >actual &&
+ test_cmp expect actual
'
unset h_TEST h_OTHER h_FIXED h_MERGED
@@ -1368,7 +1368,7 @@ test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction creating branches
(
for i in $(test_seq 33)
do
- echo "create refs/heads/$i HEAD"
+ echo "create refs/heads/$i HEAD" || exit 1
done >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
git rev-parse --verify -q refs/heads/33
@@ -1379,7 +1379,7 @@ test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction deleting branches
(
for i in $(test_seq 33)
do
- echo "delete refs/heads/$i HEAD"
+ echo "delete refs/heads/$i HEAD" || exit 1
done >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
test_must_fail git rev-parse --verify -q refs/heads/33