Skip to content

Commit 3f80093

Browse files
committed
Revert "Merge branch 'hn/refs-test-cleanup' into next"
This reverts commit dd3af04, reversing changes made to 689316a, to replace the topic with a newer iteration.
1 parent 723aa16 commit 3f80093

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

t/t1405-main-ref-store.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
99

1010
RUN="test-tool ref-store main"
1111

12-
13-
test_expect_success 'setup' '
14-
test_commit one
15-
'
16-
17-
test_expect_success REFFILES 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
12+
test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
13+
test_commit one &&
1814
N=`find .git/refs -type f | wc -l` &&
1915
test "$N" != 0 &&
2016
$RUN pack-refs 3 &&
@@ -102,12 +98,12 @@ test_expect_success 'reflog_exists(HEAD)' '
10298

10399
test_expect_success 'delete_reflog(HEAD)' '
104100
$RUN delete-reflog HEAD &&
105-
test_must_fail git reflog exists HEAD
101+
! test -f .git/logs/HEAD
106102
'
107103

108104
test_expect_success 'create-reflog(HEAD)' '
109105
$RUN create-reflog HEAD 1 &&
110-
git reflog exists HEAD
106+
test -f .git/logs/HEAD
111107
'
112108

113109
test_expect_success 'delete_ref(refs/heads/foo)' '

t/t1410-reflog.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,7 @@ test_expect_failure 'reflog with non-commit entries displays all entries' '
374374
test_line_count = 3 actual
375375
'
376376

377-
# This test takes a lock on an individual ref; this is not supported in
378-
# reftable.
379-
test_expect_success REFFILES 'reflog expire operates on symref not referrent' '
377+
test_expect_success 'reflog expire operates on symref not referrent' '
380378
git branch --create-reflog the_symref &&
381379
git branch --create-reflog referrent &&
382380
git update-ref referrent HEAD &&

t/t6001-rev-list-graft.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ test_expect_success setup '
2323
git commit -a -m "Third in one history." &&
2424
A2=$(git rev-parse --verify HEAD) &&
2525
26-
git update-ref -d refs/heads/main &&
27-
rm -f .git/index &&
26+
rm -f .git/refs/heads/main .git/index &&
2827
2928
echo >fileA fileA again &&
3029
echo >subdir/fileB fileB again &&

t/t6500-gc.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ test_expect_success 'background auto gc respects lock for all operations' '
241241
242242
# create a ref whose loose presence we can use to detect a pack-refs run
243243
git update-ref refs/heads/should-be-loose HEAD &&
244-
(ls -1 .git/refs/heads .git/reftable >expect || true) &&
244+
test_path_is_file .git/refs/heads/should-be-loose &&
245245
246246
# now fake a concurrent gc that holds the lock; we can use our
247247
# shell pid so that it looks valid.
@@ -258,8 +258,7 @@ test_expect_success 'background auto gc respects lock for all operations' '
258258
259259
# our gc should exit zero without doing anything
260260
run_and_wait_for_auto_gc &&
261-
(ls -1 .git/refs/heads .git/reftable >actual || true) &&
262-
test_cmp expect actual
261+
test_path_is_file .git/refs/heads/should-be-loose
263262
'
264263

265264
# DO NOT leave a detached auto gc process running near the end of the

t/t7064-wtstatus-pv2.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,10 @@ test_expect_success 'verify upstream fields in branch header' '
373373
374374
## Test upstream-gone case. Fake this by pointing
375375
## origin/initial-branch at a non-existing commit.
376-
git update-ref -d refs/remotes/origin/initial-branch &&
376+
OLD=$(git rev-parse origin/initial-branch) &&
377+
NEW=$ZERO_OID &&
378+
mv .git/packed-refs .git/old-packed-refs &&
379+
sed "s/$OLD/$NEW/g" <.git/old-packed-refs >.git/packed-refs &&
377380
378381
HUF=$(git rev-parse HEAD) &&
379382

0 commit comments

Comments
 (0)