{"thread":{"id":"60880","subject":"[PATCH 0/7] t: drop more REFFILES prereqs","startedAt":"2024-02-09T07:23:11Z","lastAt":"2024-02-15T18:19:28Z","messageCount":28,"participants":["Patrick Steinhardt","Karthik Nayak","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"488267","messageId":"cover.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":null,"subject":"[PATCH 0/7] t: drop more REFFILES prereqs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:05Z","receivedAt":"2024-02-09T07:23:11Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series is another step towards less tests with the REFFILES\nprerequisite. Some of the tests are simply moved into t0600 because they\nare inherently exercising low-level behaviour of the \"files\" backend.\nOther tests are adapted so that they work across both the \"files\" and\nthe \"reftable\" backends.\n\nPatrick\n\nPatrick Steinhardt (7):\n  t: move tests exercising the \"files\" backend\n  t0410: enable tests with extensions with non-default repo format\n  t1400: exercise reflog with gaps with reftable backend\n  t1404: make D/F conflict tests compatible with reftable backend\n  t1405: remove unneeded cleanup step\n  t2011: exercise D/F conflicts with HEAD with the reftable backend\n  t7003: ensure filter-branch prunes reflogs with the reftable backend\n\n t/t0410-partial-clone.sh         |  6 +--\n t/t0600-reffiles-backend.sh      | 91 ++++++++++++++++++++++++++++++++\n t/t1301-shared-repo.sh           | 16 ------\n t/t1400-update-ref.sh            | 50 +++---------------\n t/t1404-update-ref-errors.sh     | 37 ++++++-------\n t/t1405-main-ref-store.sh        |  6 ---\n t/t2011-checkout-invalid-head.sh | 17 +++---\n t/t3200-branch.sh                | 29 ----------\n t/t3400-rebase.sh                | 10 ----\n t/t7003-filter-branch.sh         |  5 +-\n 10 files changed, 125 insertions(+), 142 deletions(-)\n\n-- \n2.43.GIT\n\n"},{"id":"488268","messageId":"2eca90234f60b5f48e444e8be212bd70b9ebf924.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 1/7] t: move tests exercising the \"files\" backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:09Z","receivedAt":"2024-02-09T07:23:13Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"We still have a bunch of tests scattered across our test suites that\nexercise on-disk files of the \"files\" backend directly:\n\n  - t1301 exercises permissions of reflog files when the config\n    \"core.sharedRepository\" is set.\n\n  - t1400 exercises whether empty directories in the ref store are\n    handled correctly.\n\n  - t3200 exercises what happens when there are symlinks in the ref\n    store.\n\n  - t3400 also exercises what happens when \".git/logs\" is a symlink.\n\nAll of these are inherently low-level tests specific to the \"files\"\nbackend. Move them into \"t0600-reffiles-backend.sh\" to reflect this.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0600-reffiles-backend.sh | 91 +++++++++++++++++++++++++++++++++++++\n t/t1301-shared-repo.sh      | 16 -------\n t/t1400-update-ref.sh       | 36 ---------------\n t/t3200-branch.sh           | 29 ------------\n t/t3400-rebase.sh           | 10 ----\n 5 files changed, 91 insertions(+), 91 deletions(-)\n\ndiff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh\nindex e6a5f1868f..485481d6b4 100755\n--- a/t/t0600-reffiles-backend.sh\n+++ b/t/t0600-reffiles-backend.sh\n@@ -381,4 +381,95 @@ test_expect_success 'log diagnoses bogus HEAD symref' '\n \ttest_grep broken stderr\n '\n \n+test_expect_success 'empty directory removal' '\n+\tgit branch d1/d2/r1 HEAD &&\n+\tgit branch d1/r2 HEAD &&\n+\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n+\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n+\tgit branch -d d1/d2/r1 &&\n+\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n+\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n+\ttest_path_is_file .git/refs/heads/d1/r2 &&\n+\ttest_path_is_file .git/logs/refs/heads/d1/r2\n+'\n+\n+test_expect_success 'symref empty directory removal' '\n+\tgit branch e1/e2/r1 HEAD &&\n+\tgit branch e1/r2 HEAD &&\n+\tgit checkout e1/e2/r1 &&\n+\ttest_when_finished \"git checkout main\" &&\n+\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n+\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n+\tgit update-ref -d HEAD &&\n+\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n+\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n+\ttest_path_is_file .git/refs/heads/e1/r2 &&\n+\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n+\ttest_path_is_file .git/logs/HEAD\n+'\n+\n+test_expect_success 'directory not created deleting packed ref' '\n+\tgit branch d1/d2/r1 HEAD &&\n+\tgit pack-refs --all &&\n+\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n+\tgit update-ref -d refs/heads/d1/d2/r1 &&\n+\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n+\ttest_path_is_missing .git/refs/heads/d1\n+'\n+\n+test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '\n+\tgit branch --create-reflog u &&\n+\tmv .git/logs/refs/heads/u real-u &&\n+\tln -s real-u .git/logs/refs/heads/u &&\n+\ttest_must_fail git branch -m u v\n+'\n+\n+test_expect_success SYMLINKS 'git branch -m with symlinked .git/refs' '\n+\ttest_when_finished \"rm -rf subdir\" &&\n+\tgit init --bare subdir &&\n+\n+\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n+\tln -s ../.git/refs subdir/refs &&\n+\tln -s ../.git/objects subdir/objects &&\n+\tln -s ../.git/packed-refs subdir/packed-refs &&\n+\n+\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n+\tgit rev-parse --absolute-git-dir >our.dir &&\n+\t! test_cmp subdir.dir our.dir &&\n+\n+\tgit -C subdir log &&\n+\tgit -C subdir branch rename-src &&\n+\tgit rev-parse rename-src >expect &&\n+\tgit -C subdir branch -m rename-src rename-dest &&\n+\tgit rev-parse rename-dest >actual &&\n+\ttest_cmp expect actual &&\n+\tgit branch -D rename-dest\n+'\n+\n+test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n+\tgit checkout main &&\n+\tmv .git/logs actual_logs &&\n+\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n+\tgit rebase -f HEAD^ &&\n+\ttest -L .git/logs &&\n+\trm .git/logs &&\n+\tmv actual_logs .git/logs\n+'\n+\n+test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n+\tumask 077 &&\n+\tgit config core.sharedRepository group &&\n+\tgit reflog expire --all &&\n+\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n+\tcase \"$actual\" in\n+\t-rw-rw-*)\n+\t\t: happy\n+\t\t;;\n+\t*)\n+\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n+\t\tfalse\n+\t\t;;\n+\tesac\n+'\n+\n test_done\ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex 8e2c01e760..b1eb5c01b8 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -137,22 +137,6 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' '\n-\tumask 077 &&\n-\tgit config core.sharedRepository group &&\n-\tgit reflog expire --all &&\n-\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n-\tcase \"$actual\" in\n-\t-rw-rw-*)\n-\t\t: happy\n-\t\t;;\n-\t*)\n-\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n-\t\tfalse\n-\t\t;;\n-\tesac\n-'\n-\n test_expect_success POSIXPERM 'forced modes' '\n \ttest_when_finished \"rm -rf new\" &&\n \tmkdir -p templates/hooks &&\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex f18843bf7a..3294b7ce08 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -288,33 +288,6 @@ test_expect_success \"set $m (logged by touch)\" '\n \ttest $A = $(git show-ref -s --verify $m)\n '\n \n-test_expect_success REFFILES 'empty directory removal' '\n-\tgit branch d1/d2/r1 HEAD &&\n-\tgit branch d1/r2 HEAD &&\n-\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n-\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n-\tgit branch -d d1/d2/r1 &&\n-\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n-\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n-\ttest_path_is_file .git/refs/heads/d1/r2 &&\n-\ttest_path_is_file .git/logs/refs/heads/d1/r2\n-'\n-\n-test_expect_success REFFILES 'symref empty directory removal' '\n-\tgit branch e1/e2/r1 HEAD &&\n-\tgit branch e1/r2 HEAD &&\n-\tgit checkout e1/e2/r1 &&\n-\ttest_when_finished \"git checkout main\" &&\n-\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n-\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n-\tgit update-ref -d HEAD &&\n-\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n-\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n-\ttest_path_is_file .git/refs/heads/e1/r2 &&\n-\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n-\ttest_path_is_file .git/logs/HEAD\n-'\n-\n cat >expect <<EOF\n $Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tInitial Creation\n $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000\tSwitch\n@@ -1668,13 +1641,4 @@ test_expect_success PIPE 'transaction flushes status updates' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success REFFILES 'directory not created deleting packed ref' '\n-\tgit branch d1/d2/r1 HEAD &&\n-\tgit pack-refs --all &&\n-\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n-\tgit update-ref -d refs/heads/d1/d2/r1 &&\n-\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n-\ttest_path_is_missing .git/refs/heads/d1\n-'\n-\n test_done\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex de7d3014e4..e36f4d15f2 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -836,35 +836,6 @@ test_expect_success 'renaming a symref is not allowed' '\n \ttest_ref_missing refs/heads/new-topic\n '\n \n-test_expect_success SYMLINKS,REFFILES 'git branch -m u v should fail when the reflog for u is a symlink' '\n-\tgit branch --create-reflog u &&\n-\tmv .git/logs/refs/heads/u real-u &&\n-\tln -s real-u .git/logs/refs/heads/u &&\n-\ttest_must_fail git branch -m u v\n-'\n-\n-test_expect_success SYMLINKS,REFFILES 'git branch -m with symlinked .git/refs' '\n-\ttest_when_finished \"rm -rf subdir\" &&\n-\tgit init --bare subdir &&\n-\n-\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n-\tln -s ../.git/refs subdir/refs &&\n-\tln -s ../.git/objects subdir/objects &&\n-\tln -s ../.git/packed-refs subdir/packed-refs &&\n-\n-\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n-\tgit rev-parse --absolute-git-dir >our.dir &&\n-\t! test_cmp subdir.dir our.dir &&\n-\n-\tgit -C subdir log &&\n-\tgit -C subdir branch rename-src &&\n-\tgit rev-parse rename-src >expect &&\n-\tgit -C subdir branch -m rename-src rename-dest &&\n-\tgit rev-parse rename-dest >actual &&\n-\ttest_cmp expect actual &&\n-\tgit branch -D rename-dest\n-'\n-\n test_expect_success 'test tracking setup via --track' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 57f1392926..e1c8c5f701 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -424,16 +424,6 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' '\n \ttest_grep \"already used by worktree at\" err\n '\n \n-test_expect_success REFFILES,MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n-\tgit checkout main &&\n-\tmv .git/logs actual_logs &&\n-\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n-\tgit rebase -f HEAD^ &&\n-\ttest -L .git/logs &&\n-\trm .git/logs &&\n-\tmv actual_logs .git/logs\n-'\n-\n test_expect_success 'rebase when inside worktree subdirectory' '\n \tgit init main-wt &&\n \t(\n-- \n2.43.GIT\n\n"},{"id":"488269","messageId":"feef6a3e6cd0d9096816d0a8a5789837fb784517.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 2/7] t0410: enable tests with extensions with non-default repo format","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:13Z","receivedAt":"2024-02-09T07:23:17Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t0410 we have two tests which exercise how partial clones behave in\nthe context of a repository with extensions. These tests are marked to\nrequire a default repository using SHA1 and the \"files\" backend because\nwe explicitly set the repository format version to 0.\n\nChanging the repository format version to 0 is not needed though. The\n\"noop\" extension is ignored as expected regardless of what the version\nis set to, same as the \"nonsense\" extension leads to failure regardless\nof the version.\n\nStop setting the version so that these tests can execute with SHA256 and\n\"reftable\" repositories.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0410-partial-clone.sh | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh\nindex 6b6424b3df..d913f3c453 100755\n--- a/t/t0410-partial-clone.sh\n+++ b/t/t0410-partial-clone.sh\n@@ -49,24 +49,22 @@ test_expect_success 'convert shallow clone to partial clone' '\n \ttest_cmp_config -C client 1 core.repositoryformatversion\n '\n \n-test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '\n+test_expect_success 'convert to partial clone with noop extension' '\n \trm -fr server client &&\n \ttest_create_repo server &&\n \ttest_commit -C server my_commit 1 &&\n \ttest_commit -C server my_commit2 1 &&\n \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n-\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n \tgit -C client config extensions.noop true &&\n \tgit -C client fetch --unshallow --filter=\"blob:none\"\n '\n \n-test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '\n+test_expect_success 'converting to partial clone fails with unrecognized extension' '\n \trm -fr server client &&\n \ttest_create_repo server &&\n \ttest_commit -C server my_commit 1 &&\n \ttest_commit -C server my_commit2 1 &&\n \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n-\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n \tgit -C client config extensions.nonsense true &&\n \ttest_must_fail git -C client fetch --unshallow --filter=\"blob:none\"\n '\n-- \n2.43.GIT\n\n"},{"id":"488270","messageId":"9d8eed354ee3f0c9f66c22d92afd4c4c80f102e4.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 3/7] t1400: exercise reflog with gaps with reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:18Z","receivedAt":"2024-02-09T07:23:21Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t1400, we have a test that exercises whether we print a warning\nmessage as expected when the reflog contains entries which have a gap\nbetween the old entry's new object ID and the new entry's old object ID.\nWhile the logic should apply to all ref backends, the test setup writes\ninto `.git/logs` directly and is thus \"files\"-backend specific.\n\nRefactor the test to instead use `git reflog delete` to create the gap\nand drop the REFFILES prerequisite.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1400-update-ref.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 3294b7ce08..3aeb103d34 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -426,15 +426,15 @@ test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n rm -f expect\n git update-ref -d $m\n \n-test_expect_success REFFILES 'query reflog with gap' '\n+test_expect_success 'query reflog with gap' '\n \ttest_when_finished \"git update-ref -d $m\" &&\n \n-\tgit update-ref $m $F &&\n-\tcat >.git/logs/$m <<-EOF &&\n-\t$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500\n-\t$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500\n-\t$D $F $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500\n-\tEOF\n+\tGIT_COMMITTER_DATE=\"1117150320 -0500\" git update-ref $m $A &&\n+\tGIT_COMMITTER_DATE=\"1117150380 -0500\" git update-ref $m $B &&\n+\tGIT_COMMITTER_DATE=\"1117150480 -0500\" git update-ref $m $C &&\n+\tGIT_COMMITTER_DATE=\"1117150580 -0500\" git update-ref $m $D &&\n+\tGIT_COMMITTER_DATE=\"1117150680 -0500\" git update-ref $m $F &&\n+\tgit reflog delete $m@{2} &&\n \n \tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >actual 2>stderr &&\n \techo \"$B\" >expect &&\n-- \n2.43.GIT\n\n"},{"id":"488271","messageId":"70c6f980126aabb2ade336861e816cf1fe6e9110.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 4/7] t1404: make D/F conflict tests compatible with reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:22Z","receivedAt":"2024-02-09T07:23:26Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t1404 exercise whether Git correctly aborts\ntransactions when there is a directory/file conflict with ref names.\nWhile these tests are all marked to require the \"files\" backend, they do\nin fact apply to the \"reftable\" backend as well.\n\nThis may not make much sense on the surface: D/F conflicts only exist\nbecause the \"files\" backend uses the filesystem to store loose refs, and\nthus the restriction theoretically shouldn't apply to the \"reftable\"\nbackend. But for now, the \"reftable\" backend artificially restricts the\ncreation of such conflicting refs so that it is a drop-in replacement\nfor the \"files\" backend. This also ensures that the \"reftable\" backend\ncan easily be used on the server side without causing issues for clients\nwhich only know to use the \"files\" backend.\n\nThe only difference between the \"files\" and \"reftable\" backends is a\nslightly different error message. Adapt the tests to accomodate for this\ndifference and remove the REFFILES prerequisite so that we start testing\nwith both backends.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1404-update-ref-errors.sh | 37 +++++++++++++++++-------------------\n 1 file changed, 17 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh\nindex 00b7013705..98e9158bd2 100755\n--- a/t/t1404-update-ref-errors.sh\n+++ b/t/t1404-update-ref-errors.sh\n@@ -92,9 +92,6 @@ df_test() {\n \telse\n \t\tdelname=\"$delref\"\n \tfi &&\n-\tcat >expected-err <<-EOF &&\n-\tfatal: cannot lock ref $SQ$addname$SQ: $SQ$delref$SQ exists; cannot create $SQ$addref$SQ\n-\tEOF\n \t$pack &&\n \tif $add_del\n \tthen\n@@ -103,7 +100,7 @@ df_test() {\n \t\tprintf \"%s\\n\" \"delete $delname\" \"create $addname $D\"\n \tfi >commands &&\n \ttest_must_fail git update-ref --stdin <commands 2>output.err &&\n-\ttest_cmp expected-err output.err &&\n+\tgrep \"fatal:\\( cannot lock ref $SQ$addname$SQ:\\)\\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ\" output.err &&\n \tprintf \"%s\\n\" \"$C $delref\" >expected-refs &&\n \tgit for-each-ref --format=\"%(objectname) %(refname)\" $prefix/r >actual-refs &&\n \ttest_cmp expected-refs actual-refs\n@@ -191,69 +188,69 @@ test_expect_success 'one new ref is a simple prefix of another' '\n \n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '\n+test_expect_success 'D/F conflict prevents add long + delete short' '\n \tdf_test refs/df-al-ds --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '\n+test_expect_success 'D/F conflict prevents add short + delete long' '\n \tdf_test refs/df-as-dl --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '\n+test_expect_success 'D/F conflict prevents delete long + add short' '\n \tdf_test refs/df-dl-as --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete short + add long' '\n+test_expect_success 'D/F conflict prevents delete short + add long' '\n \tdf_test refs/df-ds-al --del-add foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' '\n+test_expect_success 'D/F conflict prevents add long + delete short packed' '\n \tdf_test refs/df-al-dsp --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' '\n+test_expect_success 'D/F conflict prevents add short + delete long packed' '\n \tdf_test refs/df-as-dlp --pack --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' '\n+test_expect_success 'D/F conflict prevents delete long packed + add short' '\n \tdf_test refs/df-dlp-as --pack --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' '\n+test_expect_success 'D/F conflict prevents delete short packed + add long' '\n \tdf_test refs/df-dsp-al --pack --del-add foo foo/bar\n '\n \n # Try some combinations involving symbolic refs...\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n+test_expect_success 'D/F conflict prevents indirect add long + delete short' '\n \tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '\n+test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '\n \tdf_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' '\n+test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' '\n \tdf_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' '\n+test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' '\n \tdf_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' '\n+test_expect_success 'D/F conflict prevents indirect add long + delete short packed' '\n \tdf_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' '\n+test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' '\n \tdf_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' '\n+test_expect_success 'D/F conflict prevents add long + indirect delete short packed' '\n \tdf_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' '\n+test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' '\n \tdf_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo\n '\n \n-- \n2.43.GIT\n\n"},{"id":"488272","messageId":"25cf00c36f715edc6b4e86001a36a093f4c4b2e0.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 5/7] t1405: remove unneeded cleanup step","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:26Z","receivedAt":"2024-02-09T07:23:30Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)\nwe have added a test that explicitly deletes the reflog when not using\nthe \"files\" backend. This was required because back then, the \"reftable\"\nbackend didn't yet delete reflogs when deleting their corresponding\nbranches, and thus subsequent tests would fail because some unexpected\nreflogs still exist.\n\nThe \"reftable\" backend was eventually changed though so that it behaves\nthe same as the \"files\" backend and deletes reflogs when deleting refs.\nThis was done to make the \"reftable\" backend behave like the \"files\"\nbackend as closely as possible so that it can act as a drop-in\nreplacement.\n\nThe cleanup-style test is thus not required anymore. Remove it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1405-main-ref-store.sh | 6 ------\n 1 file changed, 6 deletions(-)\n\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 976bd71efb..1183232a72 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -33,12 +33,6 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \ttest_must_fail git rev-parse refs/tags/new-tag --\n '\n \n-# In reftable, we keep the reflogs around for deleted refs.\n-test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '\n-\t$RUN delete-reflog FOO &&\n-\t$RUN delete-reflog refs/tags/new-tag\n-'\n-\n test_expect_success 'rename_refs(main, new-main)' '\n \tgit rev-parse main >expected &&\n \t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n-- \n2.43.GIT\n\n"},{"id":"488273","messageId":"64d2548bbc47c4131aaf1684e6df2185034ba447.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 6/7] t2011: exercise D/F conflicts with HEAD with the reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:30Z","receivedAt":"2024-02-09T07:23:34Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t2011 exercise whether it is possible to move away\nfrom a symbolic HEAD ref whose target ref has a directory-file conflict\nwith another, preexisting ref. These tests don't use git-symbolic-ref(1)\nbut manually write HEAD. This is supposedly done to avoid using logic\nthat we're about to exercise, but it makes it impossible to verify\nwhether the logic also works for ref backends other than \"files\".\n\nRefactor the code to use git-symbolic-ref(1) instead so that the tests\nwork with the \"reftable\" backend, as well. We already have lots of tests\nin t1404 that ensure that both git-update-ref(1) and git-symbolic-ref(1)\nwork in such a scenario, so it should be safe to rely on it here.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t2011-checkout-invalid-head.sh | 17 +++++++----------\n 1 file changed, 7 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex 3c8135831b..04f53b1ea1 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -29,36 +29,33 @@ test_expect_success REFFILES 'checkout notices failure to lock HEAD' '\n \ttest_must_fail git checkout -b other\n '\n \n-test_expect_success REFFILES 'create ref directory/file conflict scenario' '\n+test_expect_success 'create ref directory/file conflict scenario' '\n \tgit update-ref refs/heads/outer/inner main &&\n-\n-\t# do not rely on symbolic-ref to get a known state,\n-\t# as it may use the same code we are testing\n \treset_to_df () {\n-\t\techo \"ref: refs/heads/outer\" >.git/HEAD\n+\t\tgit symbolic-ref HEAD refs/heads/outer\n \t}\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to branch)' '\n+test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '\n \treset_to_df &&\n \tgit checkout main\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to detached)' '\n+test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '\n \treset_to_df &&\n \tgit checkout --detach main\n '\n \n-test_expect_success REFFILES 'pack refs' '\n+test_expect_success 'pack refs' '\n \tgit pack-refs --all --prune\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to branch)' '\n+test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '\n \treset_to_df &&\n \tgit checkout main\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to detached)' '\n+test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '\n \treset_to_df &&\n \tgit checkout --detach main\n '\n-- \n2.43.GIT\n\n"},{"id":"488274","messageId":"7adf510f7315f656490a71d2a19d6daec90a7eb9.1707463221.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH 7/7] t7003: ensure filter-branch prunes reflogs with the reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-09T07:23:34Z","receivedAt":"2024-02-09T07:23:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t7003 we conditionally check whether the reflog for branches pruned\nby git-filter-branch(1) get deleted based on whether or not we use the\n\"files\" backend. Same as with the preceding commit, this condition was\nadded because in its initial iteration the \"reftable\" backend did not\ndelete reflogs when their corresponding ref was deleted. Since then, the\nbackend has been aligned to behave the same as the \"files\" backend\nthough, which makes this check unnecessary.\n\nRemove it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7003-filter-branch.sh | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex f6aebe92ff..5ab4d41ee7 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -396,10 +396,7 @@ test_expect_success '--prune-empty is able to prune entire branch' '\n \tgit branch prune-entire B &&\n \tgit filter-branch -f --prune-empty --index-filter \"git update-index --remove A.t B.t\" prune-entire &&\n \ttest_must_fail git rev-parse refs/heads/prune-entire &&\n-\tif test_have_prereq REFFILES\n-\tthen\n-\t\ttest_must_fail git reflog exists refs/heads/prune-entire\n-\tfi\n+\ttest_must_fail git reflog exists refs/heads/prune-entire\n '\n \n test_expect_success '--remap-to-ancestor with filename filters' '\n-- \n2.43.GIT\n\n"},{"id":"488391","messageId":"CAOLa=ZS6tuM7hTMNQ5KRntP+bgrMHWuxDAHwz7QjRNNnkEN2Ug@mail.gmail.com","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"Re: [PATCH 0/7] t: drop more REFFILES prereqs","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2024-02-11T14:00:25Z","receivedAt":"2024-02-11T14:00:27Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Hello,\n\nPatrick Steinhardt <ps@pks.im> writes:\n> Hi,\n>\n> this patch series is another step towards less tests with the REFFILES\n> prerequisite. Some of the tests are simply moved into t0600 because they\n> are inherently exercising low-level behaviour of the \"files\" backend.\n> Other tests are adapted so that they work across both the \"files\" and\n> the \"reftable\" backends.\n>\n> Patrick\n>\n\nI had a look at this series and have nothing to add. Looks great!\n\nThanks!\nKarthik\n"},{"id":"488672","messageId":"xmqqr0heu0kt.fsf@gitster.g","threadId":"60880","inReplyTo":"2eca90234f60b5f48e444e8be212bd70b9ebf924.1707463221.git.ps@pks.im","subject":"Re: [PATCH 1/7] t: move tests exercising the \"files\" backend","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T22:45:38Z","receivedAt":"2024-02-14T22:48:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> We still have a bunch of tests scattered across our test suites that\n> exercise on-disk files of the \"files\" backend directly:\n>\n>   - t1301 exercises permissions of reflog files when the config\n>     \"core.sharedRepository\" is set.\n>\n>   - t1400 exercises whether empty directories in the ref store are\n>     handled correctly.\n>\n>   - t3200 exercises what happens when there are symlinks in the ref\n>     store.\n>\n>   - t3400 also exercises what happens when \".git/logs\" is a symlink.\n>\n> All of these are inherently low-level tests specific to the \"files\"\n> backend. Move them into \"t0600-reffiles-backend.sh\" to reflect this.\n\nMakes sense, and they look like straight code movements.\n\n> diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh\n> index e6a5f1868f..485481d6b4 100755\n> --- a/t/t0600-reffiles-backend.sh\n> +++ b/t/t0600-reffiles-backend.sh\n> @@ -381,4 +381,95 @@ test_expect_success 'log diagnoses bogus HEAD symref' '\n>  \ttest_grep broken stderr\n>  '\n\nThese two are from t1400.\n\n> +test_expect_success 'empty directory removal' '\n> +\tgit branch d1/d2/r1 HEAD &&\n> +\tgit branch d1/r2 HEAD &&\n> +\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n> +\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n> +\tgit branch -d d1/d2/r1 &&\n> +\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n> +\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n> +\ttest_path_is_file .git/refs/heads/d1/r2 &&\n> +\ttest_path_is_file .git/logs/refs/heads/d1/r2\n> +'\n> +\n> +test_expect_success 'symref empty directory removal' '\n> +\tgit branch e1/e2/r1 HEAD &&\n> +\tgit branch e1/r2 HEAD &&\n> +\tgit checkout e1/e2/r1 &&\n> +\ttest_when_finished \"git checkout main\" &&\n> +\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n> +\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n> +\tgit update-ref -d HEAD &&\n> +\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n> +\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n> +\ttest_path_is_file .git/refs/heads/e1/r2 &&\n> +\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n> +\ttest_path_is_file .git/logs/HEAD\n> +'\n\nLuckily there aren't refs that were created at this point by earlier\ntests that would contradict/block the creation of the new refs this\nmoved tests would want to create.\n\n> +test_expect_success 'directory not created deleting packed ref' '\n> +\tgit branch d1/d2/r1 HEAD &&\n> +\tgit pack-refs --all &&\n> +\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n> +\tgit update-ref -d refs/heads/d1/d2/r1 &&\n> +\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n> +\ttest_path_is_missing .git/refs/heads/d1\n> +'\n\nAnd this is from the same t1400 but appears much later in the file.\nCuriously, this tries to create d1/d2/r1 that an earlier test\nalready created, and this one passes because the branch gets removed\nin the other test that also created the branch.  Tricky but not a\nfault of this patch.\n\n> +test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '\n> +\tgit branch --create-reflog u &&\n> +\tmv .git/logs/refs/heads/u real-u &&\n> +\tln -s real-u .git/logs/refs/heads/u &&\n> +\ttest_must_fail git branch -m u v\n> +'\n\nThis was migrated from t3200 and has no interaction with the new\ncontext of t0600 as branch 'u' has never been used.  I notice that\nthis test is buggy since its inception at 16c2bfbb (rename_ref: use\nlstat(2) when testing for symlink, 2006-11-29) in that we move the\nlog for branch 'u' up and then make the log for branch 'u' into a\ndangling symlink, so it probably failed for a wrong reason even\nbefore 16c2bfbb updated stat() to lstat().  Anyway, the current code\nwill see that logs/refs/heads/u is a symbolic link and fails,\nregardless of what the link points at, so we are OK.  In any case,\nnot a fault of this patch.\n\n> +test_expect_success SYMLINKS 'git branch -m with symlinked .git/refs' '\n> +\ttest_when_finished \"rm -rf subdir\" &&\n> +\tgit init --bare subdir &&\n> +\n> +\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n> +\tln -s ../.git/refs subdir/refs &&\n> +\tln -s ../.git/objects subdir/objects &&\n> +\tln -s ../.git/packed-refs subdir/packed-refs &&\n> +\n> +\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n> +\tgit rev-parse --absolute-git-dir >our.dir &&\n> +\t! test_cmp subdir.dir our.dir &&\n> +\n> +\tgit -C subdir log &&\n> +\tgit -C subdir branch rename-src &&\n> +\tgit rev-parse rename-src >expect &&\n> +\tgit -C subdir branch -m rename-src rename-dest &&\n> +\tgit rev-parse rename-dest >actual &&\n> +\ttest_cmp expect actual &&\n> +\tgit branch -D rename-dest\n> +'\n\nOK.  As long as it cleans after itself, I won't read deeply into it\nand stop at making sure this came verbatim from t3200.\n\n> +test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n> +\tgit checkout main &&\n> +\tmv .git/logs actual_logs &&\n> +\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n> +\tgit rebase -f HEAD^ &&\n> +\ttest -L .git/logs &&\n> +\trm .git/logs &&\n> +\tmv actual_logs .git/logs\n> +'\n\nAs t0600 forces the default branch to be 'main', having this one\nmigrated from t3400 should be safe.\n\n> +test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n> +\tumask 077 &&\n> +\tgit config core.sharedRepository group &&\n> +\tgit reflog expire --all &&\n> +\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n> +\tcase \"$actual\" in\n> +\t-rw-rw-*)\n> +\t\t: happy\n> +\t\t;;\n> +\t*)\n> +\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n> +\t\tfalse\n> +\t\t;;\n> +\tesac\n> +'\n\nAnd this is from t1301, another verbatim copy.\n\n\n>  test_done\n> diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\n> index 8e2c01e760..b1eb5c01b8 100755\n> --- a/t/t1301-shared-repo.sh\n> +++ b/t/t1301-shared-repo.sh\n> @@ -137,22 +137,6 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> -test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' '\n> -\tumask 077 &&\n> -\tgit config core.sharedRepository group &&\n> -\tgit reflog expire --all &&\n> -\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n> -\tcase \"$actual\" in\n> -\t-rw-rw-*)\n> -\t\t: happy\n> -\t\t;;\n> -\t*)\n> -\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n> -\t\tfalse\n> -\t\t;;\n> -\tesac\n> -'\n> -\n\nThe rest of t1301 does not appear to depend on the reflog being\nexpired, so this move should be safe.\n\n>  test_expect_success POSIXPERM 'forced modes' '\n>  \ttest_when_finished \"rm -rf new\" &&\n>  \tmkdir -p templates/hooks &&\n> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\n> index f18843bf7a..3294b7ce08 100755\n> --- a/t/t1400-update-ref.sh\n> +++ b/t/t1400-update-ref.sh\n> @@ -288,33 +288,6 @@ test_expect_success \"set $m (logged by touch)\" '\n>  \ttest $A = $(git show-ref -s --verify $m)\n>  '\n>  \n> -test_expect_success REFFILES 'empty directory removal' '\n> -\tgit branch d1/d2/r1 HEAD &&\n> -\tgit branch d1/r2 HEAD &&\n> -\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n> -\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n> -\tgit branch -d d1/d2/r1 &&\n> -\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n> -\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n> -\ttest_path_is_file .git/refs/heads/d1/r2 &&\n> -\ttest_path_is_file .git/logs/refs/heads/d1/r2\n> -'\n> -\n> -test_expect_success REFFILES 'symref empty directory removal' '\n> -\tgit branch e1/e2/r1 HEAD &&\n> -\tgit branch e1/r2 HEAD &&\n> -\tgit checkout e1/e2/r1 &&\n> -\ttest_when_finished \"git checkout main\" &&\n> -\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n> -\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n> -\tgit update-ref -d HEAD &&\n> -\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n> -\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n> -\ttest_path_is_file .git/refs/heads/e1/r2 &&\n> -\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n> -\ttest_path_is_file .git/logs/HEAD\n> -'\n> -\n>  cat >expect <<EOF\n>  $Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tInitial Creation\n>  $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000\tSwitch\n> @@ -1668,13 +1641,4 @@ test_expect_success PIPE 'transaction flushes status updates' '\n>  \ttest_cmp expected actual\n>  '\n>  \n> -test_expect_success REFFILES 'directory not created deleting packed ref' '\n> -\tgit branch d1/d2/r1 HEAD &&\n> -\tgit pack-refs --all &&\n> -\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n> -\tgit update-ref -d refs/heads/d1/d2/r1 &&\n> -\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n> -\ttest_path_is_missing .git/refs/heads/d1\n> -'\n\nI've covered how these removals should be safe for the remaining\ntests in this file already.  Good.\n\n>  test_done\n> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\n> index de7d3014e4..e36f4d15f2 100755\n> --- a/t/t3200-branch.sh\n> +++ b/t/t3200-branch.sh\n> @@ -836,35 +836,6 @@ test_expect_success 'renaming a symref is not allowed' '\n>  \ttest_ref_missing refs/heads/new-topic\n>  '\n>  \n> -test_expect_success SYMLINKS,REFFILES 'git branch -m u v should fail when the reflog for u is a symlink' '\n> -\tgit branch --create-reflog u &&\n> -\tmv .git/logs/refs/heads/u real-u &&\n> -\tln -s real-u .git/logs/refs/heads/u &&\n> -\ttest_must_fail git branch -m u v\n> -'\n> -\n> -test_expect_success SYMLINKS,REFFILES 'git branch -m with symlinked .git/refs' '\n> -\ttest_when_finished \"rm -rf subdir\" &&\n> -\tgit init --bare subdir &&\n> -\n> -\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n> -\tln -s ../.git/refs subdir/refs &&\n> -\tln -s ../.git/objects subdir/objects &&\n> -\tln -s ../.git/packed-refs subdir/packed-refs &&\n> -\n> -\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n> -\tgit rev-parse --absolute-git-dir >our.dir &&\n> -\t! test_cmp subdir.dir our.dir &&\n> -\n> -\tgit -C subdir log &&\n> -\tgit -C subdir branch rename-src &&\n> -\tgit rev-parse rename-src >expect &&\n> -\tgit -C subdir branch -m rename-src rename-dest &&\n> -\tgit rev-parse rename-dest >actual &&\n> -\ttest_cmp expect actual &&\n> -\tgit branch -D rename-dest\n> -'\n\nLikewise.\n\n> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\n> index 57f1392926..e1c8c5f701 100755\n> --- a/t/t3400-rebase.sh\n> +++ b/t/t3400-rebase.sh\n> @@ -424,16 +424,6 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' '\n>  \ttest_grep \"already used by worktree at\" err\n>  '\n>  \n> -test_expect_success REFFILES,MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n> -\tgit checkout main &&\n> -\tmv .git/logs actual_logs &&\n> -\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n> -\tgit rebase -f HEAD^ &&\n> -\ttest -L .git/logs &&\n> -\trm .git/logs &&\n> -\tmv actual_logs .git/logs\n> -'\n> -\n>  test_expect_success 'rebase when inside worktree subdirectory' '\n>  \tgit init main-wt &&\n>  \t(\n\nLooking good.\n\nThanks.\n"},{"id":"488673","messageId":"xmqqle7mu00c.fsf@gitster.g","threadId":"60880","inReplyTo":"feef6a3e6cd0d9096816d0a8a5789837fb784517.1707463221.git.ps@pks.im","subject":"Re: [PATCH 2/7] t0410: enable tests with extensions with non-default repo format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T22:57:55Z","receivedAt":"2024-02-14T22:58:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> In t0410 we have two tests which exercise how partial clones behave in\n> the context of a repository with extensions. These tests are marked to\n> require a default repository using SHA1 and the \"files\" backend because\n> we explicitly set the repository format version to 0.\n>\n> Changing the repository format version to 0 is not needed though. The\n> \"noop\" extension is ignored as expected regardless of what the version\n> is set to, same as the \"nonsense\" extension leads to failure regardless\n> of the version.\n\nIsn't the reason why 11664196 kept the forcing of the format version\nbecause it wanted to see noop ignored and nonsense failed even if\nthe format version is 0 to ensure the regression it fixed will stay\nfixed?  IOW, we force version 0 not because we do not want to test\nwith anything but SHA1 and REFFILES; we pretty much assume that with\nthe default version, noop and nonsense will be handled sensibly, and\nwe want to make sure they will be with version 0 as well.\n\nAnd once we force to version 0, we have trouble running with\nanything other than SHA1 and REFFILES, hence these prerequisites.\n\nSo, I dunno.\n\n>\n> Stop setting the version so that these tests can execute with SHA256 and\n> \"reftable\" repositories.\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  t/t0410-partial-clone.sh | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh\n> index 6b6424b3df..d913f3c453 100755\n> --- a/t/t0410-partial-clone.sh\n> +++ b/t/t0410-partial-clone.sh\n> @@ -49,24 +49,22 @@ test_expect_success 'convert shallow clone to partial clone' '\n>  \ttest_cmp_config -C client 1 core.repositoryformatversion\n>  '\n>  \n> -test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '\n> +test_expect_success 'convert to partial clone with noop extension' '\n>  \trm -fr server client &&\n>  \ttest_create_repo server &&\n>  \ttest_commit -C server my_commit 1 &&\n>  \ttest_commit -C server my_commit2 1 &&\n>  \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n> -\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n>  \tgit -C client config extensions.noop true &&\n>  \tgit -C client fetch --unshallow --filter=\"blob:none\"\n>  '\n>  \n> -test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '\n> +test_expect_success 'converting to partial clone fails with unrecognized extension' '\n>  \trm -fr server client &&\n>  \ttest_create_repo server &&\n>  \ttest_commit -C server my_commit 1 &&\n>  \ttest_commit -C server my_commit2 1 &&\n>  \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n> -\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n>  \tgit -C client config extensions.nonsense true &&\n>  \ttest_must_fail git -C client fetch --unshallow --filter=\"blob:none\"\n>  '\n"},{"id":"488674","messageId":"xmqqh6iatzxc.fsf@gitster.g","threadId":"60880","inReplyTo":"9d8eed354ee3f0c9f66c22d92afd4c4c80f102e4.1707463221.git.ps@pks.im","subject":"Re: [PATCH 3/7] t1400: exercise reflog with gaps with reftable backend","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T22:59:43Z","receivedAt":"2024-02-14T22:59:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> In t1400, we have a test that exercises whether we print a warning\n> message as expected when the reflog contains entries which have a gap\n> between the old entry's new object ID and the new entry's old object ID.\n> While the logic should apply to all ref backends, the test setup writes\n> into `.git/logs` directly and is thus \"files\"-backend specific.\n>\n> Refactor the test to instead use `git reflog delete` to create the gap\n> and drop the REFFILES prerequisite.\n\nThis rewrite looks good.\n\nInstead of mucking with the implementation detail, we achieve the\nsame with proper use of the tools provided.  Very nice.\n\nThanks.\n\n\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  t/t1400-update-ref.sh | 14 +++++++-------\n>  1 file changed, 7 insertions(+), 7 deletions(-)\n>\n> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\n> index 3294b7ce08..3aeb103d34 100755\n> --- a/t/t1400-update-ref.sh\n> +++ b/t/t1400-update-ref.sh\n> @@ -426,15 +426,15 @@ test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n>  rm -f expect\n>  git update-ref -d $m\n>  \n> -test_expect_success REFFILES 'query reflog with gap' '\n> +test_expect_success 'query reflog with gap' '\n>  \ttest_when_finished \"git update-ref -d $m\" &&\n>  \n> -\tgit update-ref $m $F &&\n> -\tcat >.git/logs/$m <<-EOF &&\n> -\t$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500\n> -\t$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500\n> -\t$D $F $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500\n> -\tEOF\n> +\tGIT_COMMITTER_DATE=\"1117150320 -0500\" git update-ref $m $A &&\n> +\tGIT_COMMITTER_DATE=\"1117150380 -0500\" git update-ref $m $B &&\n> +\tGIT_COMMITTER_DATE=\"1117150480 -0500\" git update-ref $m $C &&\n> +\tGIT_COMMITTER_DATE=\"1117150580 -0500\" git update-ref $m $D &&\n> +\tGIT_COMMITTER_DATE=\"1117150680 -0500\" git update-ref $m $F &&\n> +\tgit reflog delete $m@{2} &&\n>  \n>  \tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >actual 2>stderr &&\n>  \techo \"$B\" >expect &&\n"},{"id":"488675","messageId":"xmqqbk8itze0.fsf@gitster.g","threadId":"60880","inReplyTo":"70c6f980126aabb2ade336861e816cf1fe6e9110.1707463221.git.ps@pks.im","subject":"Re: [PATCH 4/7] t1404: make D/F conflict tests compatible with reftable backend","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T23:11:19Z","receivedAt":"2024-02-14T23:11:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>  \ttest_must_fail git update-ref --stdin <commands 2>output.err &&\n> -\ttest_cmp expected-err output.err &&\n> +\tgrep \"fatal:\\( cannot lock ref $SQ$addname$SQ:\\)\\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ\" output.err &&\n\nOK, that's more thorough than I would have done (I am lazy and would\njust check \"cannot create\"), but being more specific is better than\nbeing lazy ;-)\n\n> @@ -191,69 +188,69 @@ test_expect_success 'one new ref is a simple prefix of another' '\n>  \n>  '\n>  \n> -test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '\n> +test_expect_success 'D/F conflict prevents add long + delete short' '\n>  \tdf_test refs/df-al-ds --add-del foo/bar foo\n>  '\n\nAll the changes make sense here.  Thanks.\n"},{"id":"488676","messageId":"xmqq4jeatz3n.fsf@gitster.g","threadId":"60880","inReplyTo":"25cf00c36f715edc6b4e86001a36a093f4c4b2e0.1707463221.git.ps@pks.im","subject":"Re: [PATCH 5/7] t1405: remove unneeded cleanup step","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T23:17:32Z","receivedAt":"2024-02-14T23:17:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)\n> we have added a test that explicitly deletes the reflog when not using\n> the \"files\" backend. This was required because back then, the \"reftable\"\n> backend didn't yet delete reflogs when deleting their corresponding\n> branches, and thus subsequent tests would fail because some unexpected\n> reflogs still exist.\n>\n> The \"reftable\" backend was eventually changed though so that it behaves\n> the same as the \"files\" backend and deletes reflogs when deleting refs.\n> This was done to make the \"reftable\" backend behave like the \"files\"\n> backend as closely as possible so that it can act as a drop-in\n> replacement.\n>\n> The cleanup-style test is thus not required anymore. Remove it.\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  t/t1405-main-ref-store.sh | 6 ------\n>  1 file changed, 6 deletions(-)\n\nAgain, makes sense.\n\nThis is a tangent, but artificial limitations we imposed on reftable\nto be more similar to files backend may be something we would want\nto reconsider once reftable hits mainline and people actively start\nusing it.  Not having to lose the reflog only because you removed a\nbranch by mistake would be a powerful thing, as it would allow you\nto resurrect the branch as well as its log.  Being able to have a\nbranch 'foo', with work related to 'foo' kept inbranches 'foo/arc1'\n'foo/arc2', etc., would be a very nice organizational tool.\n\nBut it is a good idea to start limited and later making it looser.\nThese two limitations are something all users are already familiar\nwith, so it is not as cripplingly bad as it smells anyway.\n\nThanks.\n\n>\n> diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\n> index 976bd71efb..1183232a72 100755\n> --- a/t/t1405-main-ref-store.sh\n> +++ b/t/t1405-main-ref-store.sh\n> @@ -33,12 +33,6 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n>  \ttest_must_fail git rev-parse refs/tags/new-tag --\n>  '\n>  \n> -# In reftable, we keep the reflogs around for deleted refs.\n> -test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '\n> -\t$RUN delete-reflog FOO &&\n> -\t$RUN delete-reflog refs/tags/new-tag\n> -'\n> -\n>  test_expect_success 'rename_refs(main, new-main)' '\n>  \tgit rev-parse main >expected &&\n>  \t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n"},{"id":"488677","messageId":"xmqqzfw2skf1.fsf@gitster.g","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"Re: [PATCH 0/7] t: drop more REFFILES prereqs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T23:20:02Z","receivedAt":"2024-02-14T23:20:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> this patch series is another step towards less tests with the REFFILES\n> prerequisite. Some of the tests are simply moved into t0600 because they\n> are inherently exercising low-level behaviour of the \"files\" backend.\n> Other tests are adapted so that they work across both the \"files\" and\n> the \"reftable\" backends.\n\nI've read this through, and except for one of them (I left a comment\non it), they all made perfect sense.\n\nThanks.\n"},{"id":"488693","messageId":"Zc3EbCXFdG8E7_v2@tanuki","threadId":"60880","inReplyTo":"xmqqle7mu00c.fsf@gitster.g","subject":"Re: [PATCH 2/7] t0410: enable tests with extensions with non-default repo format","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T07:59:40Z","receivedAt":"2024-02-15T07:59:45Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Feb 14, 2024 at 02:57:55PM -0800, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > In t0410 we have two tests which exercise how partial clones behave in\n> > the context of a repository with extensions. These tests are marked to\n> > require a default repository using SHA1 and the \"files\" backend because\n> > we explicitly set the repository format version to 0.\n> >\n> > Changing the repository format version to 0 is not needed though. The\n> > \"noop\" extension is ignored as expected regardless of what the version\n> > is set to, same as the \"nonsense\" extension leads to failure regardless\n> > of the version.\n> \n> Isn't the reason why 11664196 kept the forcing of the format version\n> because it wanted to see noop ignored and nonsense failed even if\n> the format version is 0 to ensure the regression it fixed will stay\n> fixed?  IOW, we force version 0 not because we do not want to test\n> with anything but SHA1 and REFFILES; we pretty much assume that with\n> the default version, noop and nonsense will be handled sensibly, and\n> we want to make sure they will be with version 0 as well.\n> \n> And once we force to version 0, we have trouble running with\n> anything other than SHA1 and REFFILES, hence these prerequisites.\n> \n> So, I dunno.\n\nHum, I guess that's fair. Let me adapt the test case to instead use the\nDEFAULT_REPO_FORMAT prerequisite then.\n\nPatrick\n"},{"id":"488694","messageId":"Zc3EdG7K0NqV61rC@tanuki","threadId":"60880","inReplyTo":"xmqq4jeatz3n.fsf@gitster.g","subject":"Re: [PATCH 5/7] t1405: remove unneeded cleanup step","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T07:59:48Z","receivedAt":"2024-02-15T07:59:52Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Feb 14, 2024 at 03:17:32PM -0800, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)\n> > we have added a test that explicitly deletes the reflog when not using\n> > the \"files\" backend. This was required because back then, the \"reftable\"\n> > backend didn't yet delete reflogs when deleting their corresponding\n> > branches, and thus subsequent tests would fail because some unexpected\n> > reflogs still exist.\n> >\n> > The \"reftable\" backend was eventually changed though so that it behaves\n> > the same as the \"files\" backend and deletes reflogs when deleting refs.\n> > This was done to make the \"reftable\" backend behave like the \"files\"\n> > backend as closely as possible so that it can act as a drop-in\n> > replacement.\n> >\n> > The cleanup-style test is thus not required anymore. Remove it.\n> >\n> > Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> > ---\n> >  t/t1405-main-ref-store.sh | 6 ------\n> >  1 file changed, 6 deletions(-)\n> \n> Again, makes sense.\n> \n> This is a tangent, but artificial limitations we imposed on reftable\n> to be more similar to files backend may be something we would want\n> to reconsider once reftable hits mainline and people actively start\n> using it.  Not having to lose the reflog only because you removed a\n> branch by mistake would be a powerful thing, as it would allow you\n> to resurrect the branch as well as its log.  Being able to have a\n> branch 'foo', with work related to 'foo' kept inbranches 'foo/arc1'\n> 'foo/arc2', etc., would be a very nice organizational tool.\n> \n> But it is a good idea to start limited and later making it looser.\n> These two limitations are something all users are already familiar\n> with, so it is not as cripplingly bad as it smells anyway.\n\nYeah, I very much agree with what you say here. We have it in our\nbacklog to change this behaviour once the initial dust has settled.\n\nPatrick\n"},{"id":"488695","messageId":"Zc3IAV9qeE-VyOTi@tanuki","threadId":"60880","inReplyTo":"xmqqzfw2skf1.fsf@gitster.g","subject":"Re: [PATCH 0/7] t: drop more REFFILES prereqs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:14:57Z","receivedAt":"2024-02-15T08:15:03Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Feb 14, 2024 at 03:20:02PM -0800, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > this patch series is another step towards less tests with the REFFILES\n> > prerequisite. Some of the tests are simply moved into t0600 because they\n> > are inherently exercising low-level behaviour of the \"files\" backend.\n> > Other tests are adapted so that they work across both the \"files\" and\n> > the \"reftable\" backends.\n> \n> I've read this through, and except for one of them (I left a comment\n> on it), they all made perfect sense.\n\nThanks, also for being extra thorough with the first patch. I'll send a\nv2.\n\nPatrick\n"},{"id":"488696","messageId":"cover.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707463221.git.ps@pks.im","subject":"[PATCH v2 0/7] t: drop more REFFILES prereqs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:26Z","receivedAt":"2024-02-15T08:25:31Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis is the second version of my patch series that drops the REFFILES\nprereq from more tests, thereby increasing test coverage of the reftable\nbackend.\n\nThere's only a single change compared to v1, addressing Junio's\nfeedback. Please refer to the below range-diff.\n\nThanks!\n\nPatrick\n\nPatrick Steinhardt (7):\n  t: move tests exercising the \"files\" backend\n  t0410: convert tests to use DEFAULT_REPO_FORMAT prereq\n  t1400: exercise reflog with gaps with reftable backend\n  t1404: make D/F conflict tests compatible with reftable backend\n  t1405: remove unneeded cleanup step\n  t2011: exercise D/F conflicts with HEAD with the reftable backend\n  t7003: ensure filter-branch prunes reflogs with the reftable backend\n\n t/t0410-partial-clone.sh         |  4 +-\n t/t0600-reffiles-backend.sh      | 91 ++++++++++++++++++++++++++++++++\n t/t1301-shared-repo.sh           | 16 ------\n t/t1400-update-ref.sh            | 50 +++---------------\n t/t1404-update-ref-errors.sh     | 37 ++++++-------\n t/t1405-main-ref-store.sh        |  6 ---\n t/t2011-checkout-invalid-head.sh | 17 +++---\n t/t3200-branch.sh                | 29 ----------\n t/t3400-rebase.sh                | 10 ----\n t/t7003-filter-branch.sh         |  5 +-\n 10 files changed, 125 insertions(+), 140 deletions(-)\n\nRange-diff against v1:\n1:  2eca90234f = 1:  6891cdfdb3 t: move tests exercising the \"files\" backend\n2:  feef6a3e6c ! 2:  2dd87f3126 t0410: enable tests with extensions with non-default repo format\n    @@ Metadata\n     Author: Patrick Steinhardt <ps@pks.im>\n     \n      ## Commit message ##\n    -    t0410: enable tests with extensions with non-default repo format\n    +    t0410: convert tests to use DEFAULT_REPO_FORMAT prereq\n     \n         In t0410 we have two tests which exercise how partial clones behave in\n         the context of a repository with extensions. These tests are marked to\n    -    require a default repository using SHA1 and the \"files\" backend because\n    -    we explicitly set the repository format version to 0.\n    +    require a repository using SHA1 and the \"files\" backend because we\n    +    explicitly set the repository format version to 0, and setting up either\n    +    the \"objectFormat\" or \"refStorage\" extensions requires a repository\n    +    format version of 1.\n     \n    -    Changing the repository format version to 0 is not needed though. The\n    -    \"noop\" extension is ignored as expected regardless of what the version\n    -    is set to, same as the \"nonsense\" extension leads to failure regardless\n    -    of the version.\n    -\n    -    Stop setting the version so that these tests can execute with SHA256 and\n    -    \"reftable\" repositories.\n    +    We have recently introduced a new DEFAULT_REPO_FORMAT prerequisite.\n    +    Despite capturing the intent more directly, it also has the added\n    +    benefit that it can easily be extended in the future in case we add new\n    +    repository extensions. Adapt the tests to use it.\n     \n         Signed-off-by: Patrick Steinhardt <ps@pks.im>\n     \n    @@ t/t0410-partial-clone.sh: test_expect_success 'convert shallow clone to partial\n      '\n      \n     -test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '\n    -+test_expect_success 'convert to partial clone with noop extension' '\n    ++test_expect_success DEFAULT_REPO_FORMAT 'convert to partial clone with noop extension' '\n      \trm -fr server client &&\n      \ttest_create_repo server &&\n      \ttest_commit -C server my_commit 1 &&\n    - \ttest_commit -C server my_commit2 1 &&\n    - \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n    --\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n    - \tgit -C client config extensions.noop true &&\n    +@@ t/t0410-partial-clone.sh: test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension'\n      \tgit -C client fetch --unshallow --filter=\"blob:none\"\n      '\n      \n     -test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '\n    -+test_expect_success 'converting to partial clone fails with unrecognized extension' '\n    ++test_expect_success DEFAULT_REPO_FORMAT 'converting to partial clone fails with unrecognized extension' '\n      \trm -fr server client &&\n      \ttest_create_repo server &&\n      \ttest_commit -C server my_commit 1 &&\n    - \ttest_commit -C server my_commit2 1 &&\n    - \tgit clone --depth=1 \"file://$(pwd)/server\" client &&\n    --\ttest_cmp_config -C client 0 core.repositoryformatversion &&\n    - \tgit -C client config extensions.nonsense true &&\n    - \ttest_must_fail git -C client fetch --unshallow --filter=\"blob:none\"\n    - '\n3:  9d8eed354e = 3:  ed57913eb9 t1400: exercise reflog with gaps with reftable backend\n4:  70c6f98012 = 4:  212949689f t1404: make D/F conflict tests compatible with reftable backend\n5:  25cf00c36f = 5:  67d6aede63 t1405: remove unneeded cleanup step\n6:  64d2548bbc = 6:  24051cc246 t2011: exercise D/F conflicts with HEAD with the reftable backend\n7:  7adf510f73 = 7:  8fb6de37ce t7003: ensure filter-branch prunes reflogs with the reftable backend\n\nbase-commit: 4fc51f00ef18d2c0174ab2fd39d0ee473fd144bd\n-- \n2.44.0-rc0\n\n"},{"id":"488697","messageId":"6891cdfdb3a15ab074226a4adca74148ba152fa6.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 1/7] t: move tests exercising the \"files\" backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:30Z","receivedAt":"2024-02-15T08:25:34Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"We still have a bunch of tests scattered across our test suites that\nexercise on-disk files of the \"files\" backend directly:\n\n  - t1301 exercises permissions of reflog files when the config\n    \"core.sharedRepository\" is set.\n\n  - t1400 exercises whether empty directories in the ref store are\n    handled correctly.\n\n  - t3200 exercises what happens when there are symlinks in the ref\n    store.\n\n  - t3400 also exercises what happens when \".git/logs\" is a symlink.\n\nAll of these are inherently low-level tests specific to the \"files\"\nbackend. Move them into \"t0600-reffiles-backend.sh\" to reflect this.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0600-reffiles-backend.sh | 91 +++++++++++++++++++++++++++++++++++++\n t/t1301-shared-repo.sh      | 16 -------\n t/t1400-update-ref.sh       | 36 ---------------\n t/t3200-branch.sh           | 29 ------------\n t/t3400-rebase.sh           | 10 ----\n 5 files changed, 91 insertions(+), 91 deletions(-)\n\ndiff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh\nindex e6a5f1868f..485481d6b4 100755\n--- a/t/t0600-reffiles-backend.sh\n+++ b/t/t0600-reffiles-backend.sh\n@@ -381,4 +381,95 @@ test_expect_success 'log diagnoses bogus HEAD symref' '\n \ttest_grep broken stderr\n '\n \n+test_expect_success 'empty directory removal' '\n+\tgit branch d1/d2/r1 HEAD &&\n+\tgit branch d1/r2 HEAD &&\n+\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n+\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n+\tgit branch -d d1/d2/r1 &&\n+\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n+\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n+\ttest_path_is_file .git/refs/heads/d1/r2 &&\n+\ttest_path_is_file .git/logs/refs/heads/d1/r2\n+'\n+\n+test_expect_success 'symref empty directory removal' '\n+\tgit branch e1/e2/r1 HEAD &&\n+\tgit branch e1/r2 HEAD &&\n+\tgit checkout e1/e2/r1 &&\n+\ttest_when_finished \"git checkout main\" &&\n+\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n+\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n+\tgit update-ref -d HEAD &&\n+\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n+\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n+\ttest_path_is_file .git/refs/heads/e1/r2 &&\n+\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n+\ttest_path_is_file .git/logs/HEAD\n+'\n+\n+test_expect_success 'directory not created deleting packed ref' '\n+\tgit branch d1/d2/r1 HEAD &&\n+\tgit pack-refs --all &&\n+\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n+\tgit update-ref -d refs/heads/d1/d2/r1 &&\n+\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n+\ttest_path_is_missing .git/refs/heads/d1\n+'\n+\n+test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '\n+\tgit branch --create-reflog u &&\n+\tmv .git/logs/refs/heads/u real-u &&\n+\tln -s real-u .git/logs/refs/heads/u &&\n+\ttest_must_fail git branch -m u v\n+'\n+\n+test_expect_success SYMLINKS 'git branch -m with symlinked .git/refs' '\n+\ttest_when_finished \"rm -rf subdir\" &&\n+\tgit init --bare subdir &&\n+\n+\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n+\tln -s ../.git/refs subdir/refs &&\n+\tln -s ../.git/objects subdir/objects &&\n+\tln -s ../.git/packed-refs subdir/packed-refs &&\n+\n+\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n+\tgit rev-parse --absolute-git-dir >our.dir &&\n+\t! test_cmp subdir.dir our.dir &&\n+\n+\tgit -C subdir log &&\n+\tgit -C subdir branch rename-src &&\n+\tgit rev-parse rename-src >expect &&\n+\tgit -C subdir branch -m rename-src rename-dest &&\n+\tgit rev-parse rename-dest >actual &&\n+\ttest_cmp expect actual &&\n+\tgit branch -D rename-dest\n+'\n+\n+test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n+\tgit checkout main &&\n+\tmv .git/logs actual_logs &&\n+\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n+\tgit rebase -f HEAD^ &&\n+\ttest -L .git/logs &&\n+\trm .git/logs &&\n+\tmv actual_logs .git/logs\n+'\n+\n+test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '\n+\tumask 077 &&\n+\tgit config core.sharedRepository group &&\n+\tgit reflog expire --all &&\n+\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n+\tcase \"$actual\" in\n+\t-rw-rw-*)\n+\t\t: happy\n+\t\t;;\n+\t*)\n+\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n+\t\tfalse\n+\t\t;;\n+\tesac\n+'\n+\n test_done\ndiff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh\nindex 8e2c01e760..b1eb5c01b8 100755\n--- a/t/t1301-shared-repo.sh\n+++ b/t/t1301-shared-repo.sh\n@@ -137,22 +137,6 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' '\n-\tumask 077 &&\n-\tgit config core.sharedRepository group &&\n-\tgit reflog expire --all &&\n-\tactual=\"$(ls -l .git/logs/refs/heads/main)\" &&\n-\tcase \"$actual\" in\n-\t-rw-rw-*)\n-\t\t: happy\n-\t\t;;\n-\t*)\n-\t\techo Ooops, .git/logs/refs/heads/main is not 066x [$actual]\n-\t\tfalse\n-\t\t;;\n-\tesac\n-'\n-\n test_expect_success POSIXPERM 'forced modes' '\n \ttest_when_finished \"rm -rf new\" &&\n \tmkdir -p templates/hooks &&\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 78a09abc35..bf37763bd6 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -288,33 +288,6 @@ test_expect_success \"set $m (logged by touch)\" '\n \ttest $A = $(git show-ref -s --verify $m)\n '\n \n-test_expect_success REFFILES 'empty directory removal' '\n-\tgit branch d1/d2/r1 HEAD &&\n-\tgit branch d1/r2 HEAD &&\n-\ttest_path_is_file .git/refs/heads/d1/d2/r1 &&\n-\ttest_path_is_file .git/logs/refs/heads/d1/d2/r1 &&\n-\tgit branch -d d1/d2/r1 &&\n-\ttest_must_fail git show-ref --verify -q refs/heads/d1/d2 &&\n-\ttest_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&\n-\ttest_path_is_file .git/refs/heads/d1/r2 &&\n-\ttest_path_is_file .git/logs/refs/heads/d1/r2\n-'\n-\n-test_expect_success REFFILES 'symref empty directory removal' '\n-\tgit branch e1/e2/r1 HEAD &&\n-\tgit branch e1/r2 HEAD &&\n-\tgit checkout e1/e2/r1 &&\n-\ttest_when_finished \"git checkout main\" &&\n-\ttest_path_is_file .git/refs/heads/e1/e2/r1 &&\n-\ttest_path_is_file .git/logs/refs/heads/e1/e2/r1 &&\n-\tgit update-ref -d HEAD &&\n-\ttest_must_fail git show-ref --verify -q refs/heads/e1/e2 &&\n-\ttest_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&\n-\ttest_path_is_file .git/refs/heads/e1/r2 &&\n-\ttest_path_is_file .git/logs/refs/heads/e1/r2 &&\n-\ttest_path_is_file .git/logs/HEAD\n-'\n-\n cat >expect <<EOF\n $Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tInitial Creation\n $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000\tSwitch\n@@ -1668,13 +1641,4 @@ test_expect_success PIPE 'transaction flushes status updates' '\n \ttest_cmp expected actual\n '\n \n-test_expect_success REFFILES 'directory not created deleting packed ref' '\n-\tgit branch d1/d2/r1 HEAD &&\n-\tgit pack-refs --all &&\n-\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n-\tgit update-ref -d refs/heads/d1/d2/r1 &&\n-\ttest_path_is_missing .git/refs/heads/d1/d2 &&\n-\ttest_path_is_missing .git/refs/heads/d1\n-'\n-\n test_done\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex de7d3014e4..e36f4d15f2 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -836,35 +836,6 @@ test_expect_success 'renaming a symref is not allowed' '\n \ttest_ref_missing refs/heads/new-topic\n '\n \n-test_expect_success SYMLINKS,REFFILES 'git branch -m u v should fail when the reflog for u is a symlink' '\n-\tgit branch --create-reflog u &&\n-\tmv .git/logs/refs/heads/u real-u &&\n-\tln -s real-u .git/logs/refs/heads/u &&\n-\ttest_must_fail git branch -m u v\n-'\n-\n-test_expect_success SYMLINKS,REFFILES 'git branch -m with symlinked .git/refs' '\n-\ttest_when_finished \"rm -rf subdir\" &&\n-\tgit init --bare subdir &&\n-\n-\trm -rfv subdir/refs subdir/objects subdir/packed-refs &&\n-\tln -s ../.git/refs subdir/refs &&\n-\tln -s ../.git/objects subdir/objects &&\n-\tln -s ../.git/packed-refs subdir/packed-refs &&\n-\n-\tgit -C subdir rev-parse --absolute-git-dir >subdir.dir &&\n-\tgit rev-parse --absolute-git-dir >our.dir &&\n-\t! test_cmp subdir.dir our.dir &&\n-\n-\tgit -C subdir log &&\n-\tgit -C subdir branch rename-src &&\n-\tgit rev-parse rename-src >expect &&\n-\tgit -C subdir branch -m rename-src rename-dest &&\n-\tgit rev-parse rename-dest >actual &&\n-\ttest_cmp expect actual &&\n-\tgit branch -D rename-dest\n-'\n-\n test_expect_success 'test tracking setup via --track' '\n \tgit config remote.local.url . &&\n \tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 57f1392926..e1c8c5f701 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -424,16 +424,6 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' '\n \ttest_grep \"already used by worktree at\" err\n '\n \n-test_expect_success REFFILES,MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '\n-\tgit checkout main &&\n-\tmv .git/logs actual_logs &&\n-\tcmd //c \"mklink /D .git\\logs ..\\actual_logs\" &&\n-\tgit rebase -f HEAD^ &&\n-\ttest -L .git/logs &&\n-\trm .git/logs &&\n-\tmv actual_logs .git/logs\n-'\n-\n test_expect_success 'rebase when inside worktree subdirectory' '\n \tgit init main-wt &&\n \t(\n-- \n2.44.0-rc0\n\n"},{"id":"488698","messageId":"2dd87f3126cedd39cb5b113053c90ee35ae0e5ff.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 2/7] t0410: convert tests to use DEFAULT_REPO_FORMAT prereq","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:34Z","receivedAt":"2024-02-15T08:25:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t0410 we have two tests which exercise how partial clones behave in\nthe context of a repository with extensions. These tests are marked to\nrequire a repository using SHA1 and the \"files\" backend because we\nexplicitly set the repository format version to 0, and setting up either\nthe \"objectFormat\" or \"refStorage\" extensions requires a repository\nformat version of 1.\n\nWe have recently introduced a new DEFAULT_REPO_FORMAT prerequisite.\nDespite capturing the intent more directly, it also has the added\nbenefit that it can easily be extended in the future in case we add new\nrepository extensions. Adapt the tests to use it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t0410-partial-clone.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh\nindex 6b6424b3df..0f98b21be8 100755\n--- a/t/t0410-partial-clone.sh\n+++ b/t/t0410-partial-clone.sh\n@@ -49,7 +49,7 @@ test_expect_success 'convert shallow clone to partial clone' '\n \ttest_cmp_config -C client 1 core.repositoryformatversion\n '\n \n-test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '\n+test_expect_success DEFAULT_REPO_FORMAT 'convert to partial clone with noop extension' '\n \trm -fr server client &&\n \ttest_create_repo server &&\n \ttest_commit -C server my_commit 1 &&\n@@ -60,7 +60,7 @@ test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension'\n \tgit -C client fetch --unshallow --filter=\"blob:none\"\n '\n \n-test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '\n+test_expect_success DEFAULT_REPO_FORMAT 'converting to partial clone fails with unrecognized extension' '\n \trm -fr server client &&\n \ttest_create_repo server &&\n \ttest_commit -C server my_commit 1 &&\n-- \n2.44.0-rc0\n\n"},{"id":"488699","messageId":"ed57913eb95e4031ef3319b37aa0972c8c1ee89a.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 3/7] t1400: exercise reflog with gaps with reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:38Z","receivedAt":"2024-02-15T08:25:42Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t1400, we have a test that exercises whether we print a warning\nmessage as expected when the reflog contains entries which have a gap\nbetween the old entry's new object ID and the new entry's old object ID.\nWhile the logic should apply to all ref backends, the test setup writes\ninto `.git/logs` directly and is thus \"files\"-backend specific.\n\nRefactor the test to instead use `git reflog delete` to create the gap\nand drop the REFFILES prerequisite.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1400-update-ref.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex bf37763bd6..6ebc3ef945 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -426,15 +426,15 @@ test_expect_success 'Query \"main@{2005-05-28}\" (past end of history)' '\n rm -f expect\n git update-ref -d $m\n \n-test_expect_success REFFILES 'query reflog with gap' '\n+test_expect_success 'query reflog with gap' '\n \ttest_when_finished \"git update-ref -d $m\" &&\n \n-\tgit update-ref $m $F &&\n-\tcat >.git/logs/$m <<-EOF &&\n-\t$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500\n-\t$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500\n-\t$D $F $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500\n-\tEOF\n+\tGIT_COMMITTER_DATE=\"1117150320 -0500\" git update-ref $m $A &&\n+\tGIT_COMMITTER_DATE=\"1117150380 -0500\" git update-ref $m $B &&\n+\tGIT_COMMITTER_DATE=\"1117150480 -0500\" git update-ref $m $C &&\n+\tGIT_COMMITTER_DATE=\"1117150580 -0500\" git update-ref $m $D &&\n+\tGIT_COMMITTER_DATE=\"1117150680 -0500\" git update-ref $m $F &&\n+\tgit reflog delete $m@{2} &&\n \n \tgit rev-parse --verify \"main@{2005-05-26 23:33:01}\" >actual 2>stderr &&\n \techo \"$B\" >expect &&\n-- \n2.44.0-rc0\n\n"},{"id":"488700","messageId":"212949689fb89397c909cf83cfb8670da6d7ca3a.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 4/7] t1404: make D/F conflict tests compatible with reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:42Z","receivedAt":"2024-02-15T08:25:46Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t1404 exercise whether Git correctly aborts\ntransactions when there is a directory/file conflict with ref names.\nWhile these tests are all marked to require the \"files\" backend, they do\nin fact apply to the \"reftable\" backend as well.\n\nThis may not make much sense on the surface: D/F conflicts only exist\nbecause the \"files\" backend uses the filesystem to store loose refs, and\nthus the restriction theoretically shouldn't apply to the \"reftable\"\nbackend. But for now, the \"reftable\" backend artificially restricts the\ncreation of such conflicting refs so that it is a drop-in replacement\nfor the \"files\" backend. This also ensures that the \"reftable\" backend\ncan easily be used on the server side without causing issues for clients\nwhich only know to use the \"files\" backend.\n\nThe only difference between the \"files\" and \"reftable\" backends is a\nslightly different error message. Adapt the tests to accomodate for this\ndifference and remove the REFFILES prerequisite so that we start testing\nwith both backends.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1404-update-ref-errors.sh | 37 +++++++++++++++++-------------------\n 1 file changed, 17 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh\nindex 00b7013705..98e9158bd2 100755\n--- a/t/t1404-update-ref-errors.sh\n+++ b/t/t1404-update-ref-errors.sh\n@@ -92,9 +92,6 @@ df_test() {\n \telse\n \t\tdelname=\"$delref\"\n \tfi &&\n-\tcat >expected-err <<-EOF &&\n-\tfatal: cannot lock ref $SQ$addname$SQ: $SQ$delref$SQ exists; cannot create $SQ$addref$SQ\n-\tEOF\n \t$pack &&\n \tif $add_del\n \tthen\n@@ -103,7 +100,7 @@ df_test() {\n \t\tprintf \"%s\\n\" \"delete $delname\" \"create $addname $D\"\n \tfi >commands &&\n \ttest_must_fail git update-ref --stdin <commands 2>output.err &&\n-\ttest_cmp expected-err output.err &&\n+\tgrep \"fatal:\\( cannot lock ref $SQ$addname$SQ:\\)\\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ\" output.err &&\n \tprintf \"%s\\n\" \"$C $delref\" >expected-refs &&\n \tgit for-each-ref --format=\"%(objectname) %(refname)\" $prefix/r >actual-refs &&\n \ttest_cmp expected-refs actual-refs\n@@ -191,69 +188,69 @@ test_expect_success 'one new ref is a simple prefix of another' '\n \n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '\n+test_expect_success 'D/F conflict prevents add long + delete short' '\n \tdf_test refs/df-al-ds --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '\n+test_expect_success 'D/F conflict prevents add short + delete long' '\n \tdf_test refs/df-as-dl --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '\n+test_expect_success 'D/F conflict prevents delete long + add short' '\n \tdf_test refs/df-dl-as --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete short + add long' '\n+test_expect_success 'D/F conflict prevents delete short + add long' '\n \tdf_test refs/df-ds-al --del-add foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' '\n+test_expect_success 'D/F conflict prevents add long + delete short packed' '\n \tdf_test refs/df-al-dsp --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' '\n+test_expect_success 'D/F conflict prevents add short + delete long packed' '\n \tdf_test refs/df-as-dlp --pack --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' '\n+test_expect_success 'D/F conflict prevents delete long packed + add short' '\n \tdf_test refs/df-dlp-as --pack --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' '\n+test_expect_success 'D/F conflict prevents delete short packed + add long' '\n \tdf_test refs/df-dsp-al --pack --del-add foo foo/bar\n '\n \n # Try some combinations involving symbolic refs...\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '\n+test_expect_success 'D/F conflict prevents indirect add long + delete short' '\n \tdf_test refs/df-ial-ds --sym-add --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '\n+test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '\n \tdf_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' '\n+test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' '\n \tdf_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' '\n+test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' '\n \tdf_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' '\n+test_expect_success 'D/F conflict prevents indirect add long + delete short packed' '\n \tdf_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' '\n+test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' '\n \tdf_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' '\n+test_expect_success 'D/F conflict prevents add long + indirect delete short packed' '\n \tdf_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo\n '\n \n-test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' '\n+test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' '\n \tdf_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo\n '\n \n-- \n2.44.0-rc0\n\n"},{"id":"488701","messageId":"67d6aede63bb1088d2d2eb86d4eb13b9ea702bda.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 5/7] t1405: remove unneeded cleanup step","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:47Z","receivedAt":"2024-02-15T08:25:50Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)\nwe have added a test that explicitly deletes the reflog when not using\nthe \"files\" backend. This was required because back then, the \"reftable\"\nbackend didn't yet delete reflogs when deleting their corresponding\nbranches, and thus subsequent tests would fail because some unexpected\nreflogs still exist.\n\nThe \"reftable\" backend was eventually changed though so that it behaves\nthe same as the \"files\" backend and deletes reflogs when deleting refs.\nThis was done to make the \"reftable\" backend behave like the \"files\"\nbackend as closely as possible so that it can act as a drop-in\nreplacement.\n\nThe cleanup-style test is thus not required anymore. Remove it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1405-main-ref-store.sh | 6 ------\n 1 file changed, 6 deletions(-)\n\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 976bd71efb..1183232a72 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -33,12 +33,6 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '\n \ttest_must_fail git rev-parse refs/tags/new-tag --\n '\n \n-# In reftable, we keep the reflogs around for deleted refs.\n-test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '\n-\t$RUN delete-reflog FOO &&\n-\t$RUN delete-reflog refs/tags/new-tag\n-'\n-\n test_expect_success 'rename_refs(main, new-main)' '\n \tgit rev-parse main >expected &&\n \t$RUN rename-ref refs/heads/main refs/heads/new-main &&\n-- \n2.44.0-rc0\n\n"},{"id":"488702","messageId":"24051cc246b9d515ee2ea0418e751e47629d7662.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 6/7] t2011: exercise D/F conflicts with HEAD with the reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:51Z","receivedAt":"2024-02-15T08:25:54Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Some of the tests in t2011 exercise whether it is possible to move away\nfrom a symbolic HEAD ref whose target ref has a directory-file conflict\nwith another, preexisting ref. These tests don't use git-symbolic-ref(1)\nbut manually write HEAD. This is supposedly done to avoid using logic\nthat we're about to exercise, but it makes it impossible to verify\nwhether the logic also works for ref backends other than \"files\".\n\nRefactor the code to use git-symbolic-ref(1) instead so that the tests\nwork with the \"reftable\" backend, as well. We already have lots of tests\nin t1404 that ensure that both git-update-ref(1) and git-symbolic-ref(1)\nwork in such a scenario, so it should be safe to rely on it here.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t2011-checkout-invalid-head.sh | 17 +++++++----------\n 1 file changed, 7 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh\nindex 3c8135831b..04f53b1ea1 100755\n--- a/t/t2011-checkout-invalid-head.sh\n+++ b/t/t2011-checkout-invalid-head.sh\n@@ -29,36 +29,33 @@ test_expect_success REFFILES 'checkout notices failure to lock HEAD' '\n \ttest_must_fail git checkout -b other\n '\n \n-test_expect_success REFFILES 'create ref directory/file conflict scenario' '\n+test_expect_success 'create ref directory/file conflict scenario' '\n \tgit update-ref refs/heads/outer/inner main &&\n-\n-\t# do not rely on symbolic-ref to get a known state,\n-\t# as it may use the same code we are testing\n \treset_to_df () {\n-\t\techo \"ref: refs/heads/outer\" >.git/HEAD\n+\t\tgit symbolic-ref HEAD refs/heads/outer\n \t}\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to branch)' '\n+test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '\n \treset_to_df &&\n \tgit checkout main\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to detached)' '\n+test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '\n \treset_to_df &&\n \tgit checkout --detach main\n '\n \n-test_expect_success REFFILES 'pack refs' '\n+test_expect_success 'pack refs' '\n \tgit pack-refs --all --prune\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to branch)' '\n+test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '\n \treset_to_df &&\n \tgit checkout main\n '\n \n-test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to detached)' '\n+test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '\n \treset_to_df &&\n \tgit checkout --detach main\n '\n-- \n2.44.0-rc0\n\n"},{"id":"488703","messageId":"8fb6de37ce20bedcea6df9018e5a8a75eefb48c8.1707985173.git.ps@pks.im","threadId":"60880","inReplyTo":"cover.1707985173.git.ps@pks.im","subject":"[PATCH v2 7/7] t7003: ensure filter-branch prunes reflogs with the reftable backend","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-02-15T08:25:55Z","receivedAt":"2024-02-15T08:25:58Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In t7003 we conditionally check whether the reflog for branches pruned\nby git-filter-branch(1) get deleted based on whether or not we use the\n\"files\" backend. Same as with the preceding commit, this condition was\nadded because in its initial iteration the \"reftable\" backend did not\ndelete reflogs when their corresponding ref was deleted. Since then, the\nbackend has been aligned to behave the same as the \"files\" backend\nthough, which makes this check unnecessary.\n\nRemove it.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t7003-filter-branch.sh | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex f6aebe92ff..5ab4d41ee7 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -396,10 +396,7 @@ test_expect_success '--prune-empty is able to prune entire branch' '\n \tgit branch prune-entire B &&\n \tgit filter-branch -f --prune-empty --index-filter \"git update-index --remove A.t B.t\" prune-entire &&\n \ttest_must_fail git rev-parse refs/heads/prune-entire &&\n-\tif test_have_prereq REFFILES\n-\tthen\n-\t\ttest_must_fail git reflog exists refs/heads/prune-entire\n-\tfi\n+\ttest_must_fail git reflog exists refs/heads/prune-entire\n '\n \n test_expect_success '--remap-to-ancestor with filename filters' '\n-- \n2.44.0-rc0\n\n"},{"id":"488742","messageId":"xmqqr0hdsl25.fsf@gitster.g","threadId":"60880","inReplyTo":"Zc3EbCXFdG8E7_v2@tanuki","subject":"Re: [PATCH 2/7] t0410: enable tests with extensions with non-default repo format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-15T17:18:26Z","receivedAt":"2024-02-15T17:18:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Wed, Feb 14, 2024 at 02:57:55PM -0800, Junio C Hamano wrote:\n>> Patrick Steinhardt <ps@pks.im> writes:\n>> \n>> > In t0410 we have two tests which exercise how partial clones behave in\n>> > the context of a repository with extensions. These tests are marked to\n>> > require a default repository using SHA1 and the \"files\" backend because\n>> > we explicitly set the repository format version to 0.\n>> >\n>> > Changing the repository format version to 0 is not needed though. The\n>> > \"noop\" extension is ignored as expected regardless of what the version\n>> > is set to, same as the \"nonsense\" extension leads to failure regardless\n>> > of the version.\n>> \n>> Isn't the reason why 11664196 kept the forcing of the format version\n>> because it wanted to see noop ignored and nonsense failed even if\n>> the format version is 0 to ensure the regression it fixed will stay\n>> fixed?  IOW, we force version 0 not because we do not want to test\n>> with anything but SHA1 and REFFILES; we pretty much assume that with\n>> the default version, noop and nonsense will be handled sensibly, and\n>> we want to make sure they will be with version 0 as well.\n>> \n>> And once we force to version 0, we have trouble running with\n>> anything other than SHA1 and REFFILES, hence these prerequisites.\n>> \n>> So, I dunno.\n>\n> Hum, I guess that's fair. Let me adapt the test case to instead use the\n> DEFAULT_REPO_FORMAT prerequisite then.\n\nIf we expect that \"git init\" by default will create version 0\nrepository in the foreseeable future (and when the default gets\nfliped to create version 1, we will add CI task that forces version\n0 somehow, just like we have special CI task to run test with ref\nbackend set to reftable), then I think the patch as posted may\nactually be a good idea.  As long as somebody is checking these with\na repository in version 0 format, the original motivation behind the\ntests is satisified, and if we in addition make sure noop and\nnonsense are handled sensibly with higher versions, that would also\nbe good, too.\n\nSo perhaps we need some in-code comment next to these tests to\nremind us about that, while removing these prerequisites?\n\nThanks.\n"},{"id":"488747","messageId":"xmqq34ttsi8i.fsf@gitster.g","threadId":"60880","inReplyTo":"2dd87f3126cedd39cb5b113053c90ee35ae0e5ff.1707985173.git.ps@pks.im","subject":"Re: [PATCH v2 2/7] t0410: convert tests to use DEFAULT_REPO_FORMAT prereq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-15T18:19:25Z","receivedAt":"2024-02-15T18:19:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> We have recently introduced a new DEFAULT_REPO_FORMAT prerequisite.\n> Despite capturing the intent more directly, it also has the added\n> benefit that it can easily be extended in the future in case we add new\n> repository extensions. Adapt the tests to use it.\n\nThat is a good explanation.  Instead of lifting the prerequisite and\nforcing version 0 altogether, we can move by one step (I am puzzled\nby \"despite\" though).\n\nAs I said in a separate message, as long as we make sure somebody\nwill test with version 0, we do not mind if other people test with\nhigher versions, so in that sense, the patch in v1 may be closer to\nwhat we want to have in the longer term (but we need to figure out\nhow we \"make sure somebody will test with version 0\" first).\n\nThanks, will queue.\n\n> -test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '\n> +test_expect_success DEFAULT_REPO_FORMAT 'convert to partial clone with noop extension' '\n>  \trm -fr server client &&\n>  \ttest_create_repo server &&\n>  \ttest_commit -C server my_commit 1 &&\n> @@ -60,7 +60,7 @@ test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension'\n>  \tgit -C client fetch --unshallow --filter=\"blob:none\"\n>  '\n>  \n> -test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '\n> +test_expect_success DEFAULT_REPO_FORMAT 'converting to partial clone fails with unrecognized extension' '\n>  \trm -fr server client &&\n>  \ttest_create_repo server &&\n>  \ttest_commit -C server my_commit 1 &&\n"}]}