{"thread":{"id":"56059","subject":"[PATCH 1/2] t1415: avoid direct filesystem access for writing refs","startedAt":"2021-07-06T18:48:01Z","lastAt":"2021-07-06T19:56:02Z","messageCount":4,"participants":["Han-Wen Nienhuys via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"429311","messageId":"ae77c605a0bb156303e5739290c96dafb2d825a8.1625597277.git.gitgitgadget@gmail.com","threadId":"56059","inReplyTo":"pull.1042.git.git.1625597277.gitgitgadget@gmail.com","subject":"[PATCH 1/2] t1415: avoid direct filesystem access for writing refs","fromName":"Han-Wen Nienhuys via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-06T18:47:56Z","receivedAt":"2021-07-06T18:48:01Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"From: Han-Wen Nienhuys <hanwen@google.com>\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@google.com>\n---\n t/t1415-worktree-refs.sh | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh\nindex 7ab91241ab7..011a1a5e5e3 100755\n--- a/t/t1415-worktree-refs.sh\n+++ b/t/t1415-worktree-refs.sh\n@@ -37,9 +37,8 @@ test_expect_success 'resolve main-worktree/HEAD' '\n '\n \n test_expect_success 'ambiguous main-worktree/HEAD' '\n-\tmkdir -p .git/refs/heads/main-worktree &&\n-\ttest_when_finished rm -f .git/refs/heads/main-worktree/HEAD &&\n-\tcp .git/HEAD .git/refs/heads/main-worktree/HEAD &&\n+\ttest_when_finished git update-ref -d refs/heads/main-worktree/HEAD &&\n+\tgit update-ref refs/heads/main-worktree/HEAD $(git rev-parse HEAD) &&\n \tgit rev-parse main-worktree/HEAD 2>warn &&\n \tgrep \"main-worktree/HEAD.*ambiguous\" warn\n '\n@@ -51,9 +50,8 @@ test_expect_success 'resolve worktrees/xx/HEAD' '\n '\n \n test_expect_success 'ambiguous worktrees/xx/HEAD' '\n-\tmkdir -p .git/refs/heads/worktrees/wt1 &&\n-\ttest_when_finished rm -f .git/refs/heads/worktrees/wt1/HEAD &&\n-\tcp .git/HEAD .git/refs/heads/worktrees/wt1/HEAD &&\n+\tgit update-ref refs/heads/worktrees/wt1/HEAD $(git rev-parse HEAD) &&\n+\ttest_when_finished git update-ref -d refs/heads/worktrees/wt1/HEAD &&\n \tgit rev-parse worktrees/wt1/HEAD 2>warn &&\n \tgrep \"worktrees/wt1/HEAD.*ambiguous\" warn\n '\n-- \ngitgitgadget\n\n"},{"id":"429312","messageId":"pull.1042.git.git.1625597277.gitgitgadget@gmail.com","threadId":"56059","inReplyTo":null,"subject":"[PATCH 0/2] fix 2 more test files that were accessing file system directly.","fromName":"Han-Wen Nienhuys via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-06T18:47:55Z","receivedAt":"2021-07-06T18:48:02Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"This reduced the number of test failures in the reftable series by a bit.\n\nHan-Wen Nienhuys (2):\n  t1415: avoid direct filesystem access for writing refs\n  t7509: avoid direct file access for writing CHERRY_PICK_HEAD\n\n t/t1415-worktree-refs.sh     | 10 ++++------\n t/t7509-commit-authorship.sh |  4 ++--\n 2 files changed, 6 insertions(+), 8 deletions(-)\n\n\nbase-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1042%2Fhanwen%2Freftable-tests2-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1042/hanwen/reftable-tests2-v1\nPull-Request: https://github.com/git/git/pull/1042\n-- \ngitgitgadget\n"},{"id":"429313","messageId":"011bbd2ecc8ded798ce47c2c6a2bde64d3f98d2d.1625597277.git.gitgitgadget@gmail.com","threadId":"56059","inReplyTo":"pull.1042.git.git.1625597277.gitgitgadget@gmail.com","subject":"[PATCH 2/2] t7509: avoid direct file access for writing CHERRY_PICK_HEAD","fromName":"Han-Wen Nienhuys via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-07-06T18:47:57Z","receivedAt":"2021-07-06T18:48:02Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"From: Han-Wen Nienhuys <hanwen@google.com>\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@google.com>\n---\n t/t7509-commit-authorship.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7509-commit-authorship.sh b/t/t7509-commit-authorship.sh\nindex ee6c47416ed..d568593382c 100755\n--- a/t/t7509-commit-authorship.sh\n+++ b/t/t7509-commit-authorship.sh\n@@ -147,7 +147,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '\n \ttest_tick &&\n \tgit commit -am \"cherry-pick 1\" --author=\"Cherry <cherry@pick.er>\" &&\n \tgit tag cherry-pick-head &&\n-\tgit rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&\n+\tgit update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&\n \techo \"This is a MERGE_MSG\" >.git/MERGE_MSG &&\n \techo \"cherry-pick 1b\" >>foo &&\n \ttest_tick &&\n@@ -162,7 +162,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '\n '\n \n test_expect_success '--reset-author with CHERRY_PICK_HEAD' '\n-\tgit rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&\n+\tgit update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&\n \techo \"cherry-pick 2\" >>foo &&\n \ttest_tick &&\n \tgit commit -am \"cherry-pick 2\" --reset-author &&\n-- \ngitgitgadget\n"},{"id":"429334","messageId":"xmqqk0m3i5df.fsf@gitster.g","threadId":"56059","inReplyTo":"pull.1042.git.git.1625597277.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] fix 2 more test files that were accessing file system directly.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T19:55:56Z","receivedAt":"2021-07-06T19:56:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Han-Wen Nienhuys via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> This reduced the number of test failures in the reftable series by a bit.\n>\n> Han-Wen Nienhuys (2):\n>   t1415: avoid direct filesystem access for writing refs\n>   t7509: avoid direct file access for writing CHERRY_PICK_HEAD\n\nThanks.  Both look quite sensible.\n\nWill queue.\n\n\n>\n>  t/t1415-worktree-refs.sh     | 10 ++++------\n>  t/t7509-commit-authorship.sh |  4 ++--\n>  2 files changed, 6 insertions(+), 8 deletions(-)\n>\n>\n> base-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1042%2Fhanwen%2Freftable-tests2-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1042/hanwen/reftable-tests2-v1\n> Pull-Request: https://github.com/git/git/pull/1042\n"}]}