From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-07-19 18:11:42
This fixes a few test failures in the reftable series.
Han-Wen Nienhuys (6):
t6050: use git-update-ref rather than filesystem access
t1503: mark symlink test as REFFILES
t6120: use git-update-ref rather than filesystem access
t7509: use git-update-ref rather than filesystem access
t3320: use git-symbolic-ref rather than filesystem access
t2402: use ref-store test helper to create broken symlink
t/t1503-rev-parse-verify.sh | 2 +-
t/t2402-worktree-list.sh | 2 +-
t/t3320-notes-merge-worktrees.sh | 12 +++++++-----
t/t6050-replace.sh | 2 +-
t/t6120-describe.sh | 6 ++++--
t/t7509-commit-authorship.sh | 4 ++--
6 files changed, 16 insertions(+), 12 deletions(-)
base-commit: 75ae10bc75336db031ee58d13c5037b929235912
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1052%2Fhanwen%2Ftest-fixes-v3-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1052/hanwen/test-fixes-v3-v1
Pull-Request: https://github.com/git/git/pull/1052
--
gitgitgadget
@@ -46,8 +46,9 @@ test_expect_success 'create some new worktrees' ' test_expect_success'merge z into y fails and sets NOTES_MERGE_REF''gitconfigcore.notesRefrefs/notes/y&&test_must_failgitnotesmergez&&-echo"ref: refs/notes/y">expect&&-test_cmpexpect.git/NOTES_MERGE_REF+echo"refs/notes/y">expect&&+gitsymbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_expect_success'merge z into y while mid-merge in another workdir fails''
@@ -57,7 +58,7 @@ test_expect_success 'merge z into y while mid-merge in another workdir fails' 'test_must_failgitnotesmergez2>err&&test_i18ngrep"a notes merge into refs/notes/y is already in-progress at"err)&&-test_path_is_missing.git/worktrees/worktree/NOTES_MERGE_REF+test_must_failgit-Cworktreesymbolic-refNOTES_MERGE_REF' test_expect_success'merge z into x while mid-merge on y succeeds''
@@ -68,8 +69,9 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' 'test_i18ngrep"Automatic notes merge failed"out&&grep-v"A notes merge into refs/notes/x is already in-progress in"out)&&-echo"ref: refs/notes/x">expect&&-test_cmpexpect.git/worktrees/worktree2/NOTES_MERGE_REF+echo"refs/notes/x">expect&&+git-Cworktree2symbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_done
@@ -142,7 +142,7 @@ test_expect_success 'main@{n} for various n' 'test_must_failgitrev-parse--verifymain@{$Np1}'-test_expect_successSYMLINKS'ref resolution not confused by broken symlinks''+test_expect_successSYMLINKS,REFFILES'ref resolution not confused by broken symlinks''ln-sdoes-not-exist.git/refs/heads/broken&&test_must_failgitrev-parse--verifybroken'
@@ -230,7 +230,7 @@ test_expect_success 'broken main worktree still at the top' 'EOFcdlinked&&echo"worktree $(pwd)">expected&&-echo"ref: .broken">../.git/HEAD&&+(cd../&&test-toolref-storemaincreate-symrefHEAD.broken)&&gitworktreelist--porcelain>out&&head-n3out>actual&&test_cmp../expectedactual&&
@@ -107,7 +107,8 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' ' check_describetags/A--allA^0 test_expect_success'renaming tag A to Q locally produces a warning'"-mv.git/refs/tags/A.git/refs/tags/Q&&+gitupdate-refrefs/tags/Q$(gitrev-parserefs/tags/A)&&+gitupdate-ref-drefs/tags/A&&gitdescribeHEAD2>err>out&&cat>expected<<-\EOF&&warning:tag'Q'isexternallyknownas'A'
@@ -135,7 +136,8 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '' test_expect_success'rename tag Q back to A''-mv.git/refs/tags/Q.git/refs/tags/A+gitupdate-refrefs/tags/A$(gitrev-parserefs/tags/Q)&&+gitupdate-ref-drefs/tags/Q' test_expect_success'pack tag refs''git pack-refs'
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-07-22 21:28:52
This fixes a few test failures in the reftable series.
Han-Wen Nienhuys (11):
t6050: use git-update-ref rather than filesystem access
t1503: mark symlink test as REFFILES
t6120: use git-update-ref rather than filesystem access
t3320: use git-symbolic-ref rather than filesystem access
t2402: use ref-store test helper to create broken symlink
t1405: use 'git reflog exists' to check reflog existence
t1405: mark test for 'git pack-refs' as REFFILES
t1410: mark test as REFFILES
t7064: use update-ref -d to remove upstream branch
t6500: use "ls -1" to snapshot ref database state
t6001: avoid direct file system access
t/t1405-main-ref-store.sh | 12 ++++++++----
t/t1410-reflog.sh | 4 +++-
t/t1503-rev-parse-verify.sh | 2 +-
t/t2402-worktree-list.sh | 2 +-
t/t3320-notes-merge-worktrees.sh | 12 +++++++-----
t/t6001-rev-list-graft.sh | 3 ++-
t/t6050-replace.sh | 2 +-
t/t6120-describe.sh | 6 ++++--
t/t6500-gc.sh | 5 +++--
t/t7064-wtstatus-pv2.sh | 5 +----
10 files changed, 31 insertions(+), 22 deletions(-)
base-commit: daab8a564f8bbac55f70f8bf86c070e001a9b006
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1052%2Fhanwen%2Ftest-fixes-v3-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1052/hanwen/test-fixes-v3-v2
Pull-Request: https://github.com/git/git/pull/1052
Range-diff vs v1:
1: 61a5c3718df = 1: d7616038d88 t6050: use git-update-ref rather than filesystem access
2: 49994a0d154 = 2: cbd2128c331 t1503: mark symlink test as REFFILES
3: 695921cacb6 = 3: cbf90c13e5b t6120: use git-update-ref rather than filesystem access
4: 94d7e144f54 < -: ----------- t7509: use git-update-ref rather than filesystem access
5: cc400e9131d = 4: 7b98d092811 t3320: use git-symbolic-ref rather than filesystem access
6: 4d83f70e133 = 5: 0047266de6b t2402: use ref-store test helper to create broken symlink
-: ----------- > 6: eb2c53d19cf t1405: use 'git reflog exists' to check reflog existence
-: ----------- > 7: 05dead16f1c t1405: mark test for 'git pack-refs' as REFFILES
-: ----------- > 8: f931a26de58 t1410: mark test as REFFILES
-: ----------- > 9: 3685ba90f60 t7064: use update-ref -d to remove upstream branch
-: ----------- > 10: ccdbf3749fe t6500: use "ls -1" to snapshot ref database state
-: ----------- > 11: 81e46f95536 t6001: avoid direct file system access
--
gitgitgadget
@@ -107,7 +107,8 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' ' check_describetags/A--allA^0 test_expect_success'renaming tag A to Q locally produces a warning'"-mv.git/refs/tags/A.git/refs/tags/Q&&+gitupdate-refrefs/tags/Q$(gitrev-parserefs/tags/A)&&+gitupdate-ref-drefs/tags/A&&gitdescribeHEAD2>err>out&&cat>expected<<-\EOF&&warning:tag'Q'isexternallyknownas'A'
@@ -135,7 +136,8 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '' test_expect_success'rename tag Q back to A''-mv.git/refs/tags/Q.git/refs/tags/A+gitupdate-refrefs/tags/A$(gitrev-parserefs/tags/Q)&&+gitupdate-ref-drefs/tags/Q' test_expect_success'pack tag refs''git pack-refs'
@@ -142,7 +142,7 @@ test_expect_success 'main@{n} for various n' 'test_must_failgitrev-parse--verifymain@{$Np1}'-test_expect_successSYMLINKS'ref resolution not confused by broken symlinks''+test_expect_successSYMLINKS,REFFILES'ref resolution not confused by broken symlinks''ln-sdoes-not-exist.git/refs/heads/broken&&test_must_failgitrev-parse--verifybroken'
@@ -230,7 +230,7 @@ test_expect_success 'broken main worktree still at the top' 'EOFcdlinked&&echo"worktree $(pwd)">expected&&-echo"ref: .broken">../.git/HEAD&&+(cd../&&test-toolref-storemaincreate-symrefHEAD.broken)&&gitworktreelist--porcelain>out&&head-n3out>actual&&test_cmp../expectedactual&&
@@ -46,8 +46,9 @@ test_expect_success 'create some new worktrees' ' test_expect_success'merge z into y fails and sets NOTES_MERGE_REF''gitconfigcore.notesRefrefs/notes/y&&test_must_failgitnotesmergez&&-echo"ref: refs/notes/y">expect&&-test_cmpexpect.git/NOTES_MERGE_REF+echo"refs/notes/y">expect&&+gitsymbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_expect_success'merge z into y while mid-merge in another workdir fails''
@@ -57,7 +58,7 @@ test_expect_success 'merge z into y while mid-merge in another workdir fails' 'test_must_failgitnotesmergez2>err&&test_i18ngrep"a notes merge into refs/notes/y is already in-progress at"err)&&-test_path_is_missing.git/worktrees/worktree/NOTES_MERGE_REF+test_must_failgit-Cworktreesymbolic-refNOTES_MERGE_REF' test_expect_success'merge z into x while mid-merge on y succeeds''
@@ -68,8 +69,9 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' 'test_i18ngrep"Automatic notes merge failed"out&&grep-v"A notes merge into refs/notes/x is already in-progress in"out)&&-echo"ref: refs/notes/x">expect&&-test_cmpexpect.git/worktrees/worktree2/NOTES_MERGE_REF+echo"refs/notes/x">expect&&+git-Cworktree2symbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_done
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-07-22 21:29:02
From: Han-Wen Nienhuys <redacted>
The outcome of the pack-refs operation is not checked. This was apparently
forgotten in the commit introducing this test: 16feb99d (Mar 26 2017, "t1405:
some basic tests on main ref store").
I tried adding the obvious check this, but it seems to fail on the freebsd_12
builder.
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t1405-main-ref-store.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
@@ -374,7 +374,9 @@ test_expect_failure 'reflog with non-commit entries displays all entries' 'test_line_count=3actual'-test_expect_success'reflog expire operates on symref not referrent''+# This test takes a lock on an individual ref; this is not supported in+# reftable.+test_expect_successREFFILES'reflog expire operates on symref not referrent''gitbranch--create-reflogthe_symref&&gitbranch--create-reflogreferrent&&gitupdate-refreferrentHEAD&&
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-07-22 21:29:04
From: Han-Wen Nienhuys <redacted>
The previous code tested this by writing $ZERO_OID explicitly in the packed-refs
file. This is a type of corruption that doesn't reflect realistic use-cases. In
addition, even the ref-store test-tool refuses to write invalid OIDs.
(update-ref interprets $ZERO_OID is deleting the ref).
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t7064-wtstatus-pv2.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
@@ -373,10 +373,7 @@ test_expect_success 'verify upstream fields in branch header' '## Test upstream-gone case. Fake this by pointing## origin/initial-branch at a non-existing commit.-OLD=$(gitrev-parseorigin/initial-branch)&&-NEW=$ZERO_OID&&-mv.git/packed-refs.git/old-packed-refs&&-sed"s/$OLD/$NEW/g"<.git/old-packed-refs>.git/packed-refs&&+gitupdate-ref-drefs/remotes/origin/initial-branch&&HUF=$(gitrev-parseHEAD)&&
@@ -241,7 +241,7 @@ test_expect_success 'background auto gc respects lock for all operations' '# create a ref whose loose presence we can use to detect a pack-refs rungitupdate-refrefs/heads/should-be-looseHEAD&&-test_path_is_file.git/refs/heads/should-be-loose&&+(ls-1.git/refs/heads.git/reftable>expect||true)&&# now fake a concurrent gc that holds the lock; we can use our# shell pid so that it looks valid.
@@ -258,7 +258,8 @@ test_expect_success 'background auto gc respects lock for all operations' '# our gc should exit zero without doing anythingrun_and_wait_for_auto_gc&&-test_path_is_file.git/refs/heads/should-be-loose+(ls-1.git/refs/heads.git/reftable>actual||true)&&+test_cmpexpectactual'# DO NOT leave a detached auto gc process running near the end of the
@@ -23,7 +23,8 @@ test_expect_success setup 'gitcommit-a-m"Third in one history."&&A2=$(gitrev-parse--verifyHEAD)&&-rm-f.git/refs/heads/main.git/index&&+gitupdate-ref-drefs/heads/main&&+rm-f.git/index&&echo>fileAfileAagain&&echo>subdir/fileBfileBagain&&
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-08-02 16:53:40
This fixes a few test failures in the reftable series.
Han-Wen Nienhuys (11):
t6050: use git-update-ref rather than filesystem access
t1503: mark symlink test as REFFILES
t6120: use git-update-ref rather than filesystem access
t3320: use git-symbolic-ref rather than filesystem access
t2402: use ref-store test helper to create broken symlink
t1405: use 'git reflog exists' to check reflog existence
t1405: mark test for 'git pack-refs' as REFFILES
t1410: mark test as REFFILES
t7064: use update-ref -d to remove upstream branch
t6500: use "ls -1" to snapshot ref database state
t6001: avoid direct file system access
t/t1405-main-ref-store.sh | 18 ++++++++++++------
t/t1410-reflog.sh | 4 +++-
t/t1503-rev-parse-verify.sh | 2 +-
t/t2402-worktree-list.sh | 2 +-
t/t3320-notes-merge-worktrees.sh | 12 +++++++-----
t/t6001-rev-list-graft.sh | 3 ++-
t/t6050-replace.sh | 2 +-
t/t6120-describe.sh | 6 ++++--
t/t6500-gc.sh | 5 +++--
t/t7064-wtstatus-pv2.sh | 5 +----
10 files changed, 35 insertions(+), 24 deletions(-)
base-commit: 940fe202adcbf9fa1825c648d97cbe1b90d26aec
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1052%2Fhanwen%2Ftest-fixes-v3-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1052/hanwen/test-fixes-v3-v3
Pull-Request: https://github.com/git/git/pull/1052
Range-diff vs v2:
1: d7616038d88 = 1: ad9fd570024 t6050: use git-update-ref rather than filesystem access
2: cbd2128c331 = 2: b03be9ede7f t1503: mark symlink test as REFFILES
3: cbf90c13e5b = 3: b62c3175c4c t6120: use git-update-ref rather than filesystem access
4: 7b98d092811 = 4: 22bff0b0791 t3320: use git-symbolic-ref rather than filesystem access
5: 0047266de6b = 5: ceca139bcfc t2402: use ref-store test helper to create broken symlink
6: eb2c53d19cf = 6: add97ad8d0b t1405: use 'git reflog exists' to check reflog existence
7: 05dead16f1c ! 7: 5f9a01fd86a t1405: mark test for 'git pack-refs' as REFFILES
@@ Metadata
## Commit message ##
t1405: mark test for 'git pack-refs' as REFFILES
- The outcome of the pack-refs operation is not checked. This was apparently
- forgotten in the commit introducing this test: 16feb99d (Mar 26 2017, "t1405:
- some basic tests on main ref store").
+ The tests verifies that "pack-refs" causes loose refs to be packed. As both
+ loose and packed refs are concepts specific to the files backend, mark the test
+ as REFFILES.
- I tried adding the obvious check this, but it seems to fail on the freebsd_12
- builder.
+ Check the outcome of the pack-refs operation. This was apparently forgotten in
+ the commit introducing this test: 16feb99d (Mar 26 2017, "t1405: some basic
+ tests on main ref store").
Signed-off-by: Han-Wen Nienhuys [off-list ref]
@@ t/t1405-main-ref-store.sh: export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+test_expect_success REFFILES 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
N=`find .git/refs -type f | wc -l` &&
test "$N" != 0 &&
- $RUN pack-refs 3 &&
+- $RUN pack-refs 3 &&
+- N=`find .git/refs -type f | wc -l`
++ ALL_OR_PRUNE_FLAG=3 &&
++ $RUN pack-refs ${ALL_OR_PRUNE_FLAG} &&
++ N=`find .git/refs -type f` &&
++ test -z "$N"
+ '
+
+ test_expect_success 'create_symref(FOO, refs/heads/main)' '
8: f931a26de58 ! 8: 45bc0772c64 t1410: mark test as REFFILES
@@ Metadata
## Commit message ##
t1410: mark test as REFFILES
- In reftable, one cannot take a lock on an individual ref.
+ This test takes a lock on the target of a symref, and then verifies that it is
+ possible to expire the symref's reflog. In reftable, one can only take a global
+ lock (which would prevent the symref reflog from being expired altogether.)
Signed-off-by: Han-Wen Nienhuys [off-list ref]
9: 3685ba90f60 = 9: 1326e99a1fd t7064: use update-ref -d to remove upstream branch
10: ccdbf3749fe ! 10: 55eb2094811 t6500: use "ls -1" to snapshot ref database state
@@ Commit message
By doing ls -1 .git/{reftable,refs/heads}, we can capture changes to both
reftable and packed/loose ref storage.
+ This relies on the fact that git-pack-refs (which we're looking for here)
+ changes the number (loose/packed storage) and/or names (reftable) files used for
+ ref storage.
+
Signed-off-by: Han-Wen Nienhuys [off-list ref]
## t/t6500-gc.sh ##
11: 81e46f95536 = 11: 4a3418b7954 t6001: avoid direct file system access
--
gitgitgadget
@@ -107,7 +107,8 @@ test_expect_success 'describe --contains defaults to HEAD without commit-ish' ' check_describetags/A--allA^0 test_expect_success'renaming tag A to Q locally produces a warning'"-mv.git/refs/tags/A.git/refs/tags/Q&&+gitupdate-refrefs/tags/Q$(gitrev-parserefs/tags/A)&&+gitupdate-ref-drefs/tags/A&&gitdescribeHEAD2>err>out&&cat>expected<<-\EOF&&warning:tag'Q'isexternallyknownas'A'
@@ -135,7 +136,8 @@ test_expect_success 'abbrev=0 will not break misplaced tag (2)' '' test_expect_success'rename tag Q back to A''-mv.git/refs/tags/Q.git/refs/tags/A+gitupdate-refrefs/tags/A$(gitrev-parserefs/tags/Q)&&+gitupdate-ref-drefs/tags/Q' test_expect_success'pack tag refs''git pack-refs'
@@ -142,7 +142,7 @@ test_expect_success 'main@{n} for various n' 'test_must_failgitrev-parse--verifymain@{$Np1}'-test_expect_successSYMLINKS'ref resolution not confused by broken symlinks''+test_expect_successSYMLINKS,REFFILES'ref resolution not confused by broken symlinks''ln-sdoes-not-exist.git/refs/heads/broken&&test_must_failgitrev-parse--verifybroken'
@@ -46,8 +46,9 @@ test_expect_success 'create some new worktrees' ' test_expect_success'merge z into y fails and sets NOTES_MERGE_REF''gitconfigcore.notesRefrefs/notes/y&&test_must_failgitnotesmergez&&-echo"ref: refs/notes/y">expect&&-test_cmpexpect.git/NOTES_MERGE_REF+echo"refs/notes/y">expect&&+gitsymbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_expect_success'merge z into y while mid-merge in another workdir fails''
@@ -57,7 +58,7 @@ test_expect_success 'merge z into y while mid-merge in another workdir fails' 'test_must_failgitnotesmergez2>err&&test_i18ngrep"a notes merge into refs/notes/y is already in-progress at"err)&&-test_path_is_missing.git/worktrees/worktree/NOTES_MERGE_REF+test_must_failgit-Cworktreesymbolic-refNOTES_MERGE_REF' test_expect_success'merge z into x while mid-merge on y succeeds''
@@ -68,8 +69,9 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' 'test_i18ngrep"Automatic notes merge failed"out&&grep-v"A notes merge into refs/notes/x is already in-progress in"out)&&-echo"ref: refs/notes/x">expect&&-test_cmpexpect.git/worktrees/worktree2/NOTES_MERGE_REF+echo"refs/notes/x">expect&&+git-Cworktree2symbolic-refNOTES_MERGE_REF>actual&&+test_cmpexpectactual' test_done
@@ -230,7 +230,7 @@ test_expect_success 'broken main worktree still at the top' 'EOFcdlinked&&echo"worktree $(pwd)">expected&&-echo"ref: .broken">../.git/HEAD&&+(cd../&&test-toolref-storemaincreate-symrefHEAD.broken)&&gitworktreelist--porcelain>out&&head-n3out>actual&&test_cmp../expectedactual&&
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-08-02 16:53:53
From: Han-Wen Nienhuys <redacted>
The tests verifies that "pack-refs" causes loose refs to be packed. As both
loose and packed refs are concepts specific to the files backend, mark the test
as REFFILES.
Check the outcome of the pack-refs operation. This was apparently forgotten in
the commit introducing this test: 16feb99d (Mar 26 2017, "t1405: some basic
tests on main ref store").
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t1405-main-ref-store.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-08-02 16:53:54
From: Han-Wen Nienhuys <redacted>
This test takes a lock on the target of a symref, and then verifies that it is
possible to expire the symref's reflog. In reftable, one can only take a global
lock (which would prevent the symref reflog from being expired altogether.)
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t1410-reflog.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -374,7 +374,9 @@ test_expect_failure 'reflog with non-commit entries displays all entries' 'test_line_count=3actual'-test_expect_success'reflog expire operates on symref not referrent''+# This test takes a lock on an individual ref; this is not supported in+# reftable.+test_expect_successREFFILES'reflog expire operates on symref not referrent''gitbranch--create-reflogthe_symref&&gitbranch--create-reflogreferrent&&gitupdate-refreferrentHEAD&&
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-08-02 16:53:55
From: Han-Wen Nienhuys <redacted>
The previous code tested this by writing $ZERO_OID explicitly in the packed-refs
file. This is a type of corruption that doesn't reflect realistic use-cases. In
addition, even the ref-store test-tool refuses to write invalid OIDs.
(update-ref interprets $ZERO_OID is deleting the ref).
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t7064-wtstatus-pv2.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
@@ -373,10 +373,7 @@ test_expect_success 'verify upstream fields in branch header' '## Test upstream-gone case. Fake this by pointing## origin/initial-branch at a non-existing commit.-OLD=$(gitrev-parseorigin/initial-branch)&&-NEW=$ZERO_OID&&-mv.git/packed-refs.git/old-packed-refs&&-sed"s/$OLD/$NEW/g"<.git/old-packed-refs>.git/packed-refs&&+gitupdate-ref-drefs/remotes/origin/initial-branch&&HUF=$(gitrev-parseHEAD)&&
@@ -23,7 +23,8 @@ test_expect_success setup 'gitcommit-a-m"Third in one history."&&A2=$(gitrev-parse--verifyHEAD)&&-rm-f.git/refs/heads/main.git/index&&+gitupdate-ref-drefs/heads/main&&+rm-f.git/index&&echo>fileAfileAagain&&echo>subdir/fileBfileBagain&&
From: Han-Wen Nienhuys via GitGitGadget <hidden> Date: 2021-08-02 16:53:58
From: Han-Wen Nienhuys <redacted>
By doing ls -1 .git/{reftable,refs/heads}, we can capture changes to both
reftable and packed/loose ref storage.
This relies on the fact that git-pack-refs (which we're looking for here)
changes the number (loose/packed storage) and/or names (reftable) files used for
ref storage.
Signed-off-by: Han-Wen Nienhuys <redacted>
---
t/t6500-gc.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -241,7 +241,7 @@ test_expect_success 'background auto gc respects lock for all operations' '# create a ref whose loose presence we can use to detect a pack-refs rungitupdate-refrefs/heads/should-be-looseHEAD&&-test_path_is_file.git/refs/heads/should-be-loose&&+(ls-1.git/refs/heads.git/reftable>expect||true)&&# now fake a concurrent gc that holds the lock; we can use our# shell pid so that it looks valid.
@@ -258,7 +258,8 @@ test_expect_success 'background auto gc respects lock for all operations' '# our gc should exit zero without doing anythingrun_and_wait_for_auto_gc&&-test_path_is_file.git/refs/heads/should-be-loose+(ls-1.git/refs/heads.git/reftable>actual||true)&&+test_cmpexpectactual'# DO NOT leave a detached auto gc process running near the end of the