* [PATCH 0/2] fix 2 more test files that were accessing file system directly.
@ 2021-07-06 18:47 Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 1/2] t1415: avoid direct filesystem access for writing refs Han-Wen Nienhuys via GitGitGadget
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Han-Wen Nienhuys via GitGitGadget @ 2021-07-06 18:47 UTC (permalink / raw)
To: git; +Cc: Han-Wen Nienhuys
This reduced the number of test failures in the reftable series by a bit.
Han-Wen Nienhuys (2):
t1415: avoid direct filesystem access for writing refs
t7509: avoid direct file access for writing CHERRY_PICK_HEAD
t/t1415-worktree-refs.sh | 10 ++++------
t/t7509-commit-authorship.sh | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)
base-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1042%2Fhanwen%2Freftable-tests2-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1042/hanwen/reftable-tests2-v1
Pull-Request: https://github.com/git/git/pull/1042
--
gitgitgadget
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] t1415: avoid direct filesystem access for writing refs
2021-07-06 18:47 [PATCH 0/2] fix 2 more test files that were accessing file system directly Han-Wen Nienhuys via GitGitGadget
@ 2021-07-06 18:47 ` Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 2/2] t7509: avoid direct file access for writing CHERRY_PICK_HEAD Han-Wen Nienhuys via GitGitGadget
2021-07-06 19:55 ` [PATCH 0/2] fix 2 more test files that were accessing file system directly Junio C Hamano
2 siblings, 0 replies; 4+ messages in thread
From: Han-Wen Nienhuys via GitGitGadget @ 2021-07-06 18:47 UTC (permalink / raw)
To: git; +Cc: Han-Wen Nienhuys, Han-Wen Nienhuys
From: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
t/t1415-worktree-refs.sh | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh
index 7ab91241ab7..011a1a5e5e3 100755
--- a/t/t1415-worktree-refs.sh
+++ b/t/t1415-worktree-refs.sh
@@ -37,9 +37,8 @@ test_expect_success 'resolve main-worktree/HEAD' '
'
test_expect_success 'ambiguous main-worktree/HEAD' '
- mkdir -p .git/refs/heads/main-worktree &&
- test_when_finished rm -f .git/refs/heads/main-worktree/HEAD &&
- cp .git/HEAD .git/refs/heads/main-worktree/HEAD &&
+ test_when_finished git update-ref -d refs/heads/main-worktree/HEAD &&
+ git update-ref refs/heads/main-worktree/HEAD $(git rev-parse HEAD) &&
git rev-parse main-worktree/HEAD 2>warn &&
grep "main-worktree/HEAD.*ambiguous" warn
'
@@ -51,9 +50,8 @@ test_expect_success 'resolve worktrees/xx/HEAD' '
'
test_expect_success 'ambiguous worktrees/xx/HEAD' '
- mkdir -p .git/refs/heads/worktrees/wt1 &&
- test_when_finished rm -f .git/refs/heads/worktrees/wt1/HEAD &&
- cp .git/HEAD .git/refs/heads/worktrees/wt1/HEAD &&
+ git update-ref refs/heads/worktrees/wt1/HEAD $(git rev-parse HEAD) &&
+ test_when_finished git update-ref -d refs/heads/worktrees/wt1/HEAD &&
git rev-parse worktrees/wt1/HEAD 2>warn &&
grep "worktrees/wt1/HEAD.*ambiguous" warn
'
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] t7509: avoid direct file access for writing CHERRY_PICK_HEAD
2021-07-06 18:47 [PATCH 0/2] fix 2 more test files that were accessing file system directly Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 1/2] t1415: avoid direct filesystem access for writing refs Han-Wen Nienhuys via GitGitGadget
@ 2021-07-06 18:47 ` Han-Wen Nienhuys via GitGitGadget
2021-07-06 19:55 ` [PATCH 0/2] fix 2 more test files that were accessing file system directly Junio C Hamano
2 siblings, 0 replies; 4+ messages in thread
From: Han-Wen Nienhuys via GitGitGadget @ 2021-07-06 18:47 UTC (permalink / raw)
To: git; +Cc: Han-Wen Nienhuys, Han-Wen Nienhuys
From: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
t/t7509-commit-authorship.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7509-commit-authorship.sh b/t/t7509-commit-authorship.sh
index ee6c47416ed..d568593382c 100755
--- a/t/t7509-commit-authorship.sh
+++ b/t/t7509-commit-authorship.sh
@@ -147,7 +147,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '
test_tick &&
git commit -am "cherry-pick 1" --author="Cherry <cherry@pick.er>" &&
git tag cherry-pick-head &&
- git rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&
+ git update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&
echo "This is a MERGE_MSG" >.git/MERGE_MSG &&
echo "cherry-pick 1b" >>foo &&
test_tick &&
@@ -162,7 +162,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '
'
test_expect_success '--reset-author with CHERRY_PICK_HEAD' '
- git rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&
+ git update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&
echo "cherry-pick 2" >>foo &&
test_tick &&
git commit -am "cherry-pick 2" --reset-author &&
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] fix 2 more test files that were accessing file system directly.
2021-07-06 18:47 [PATCH 0/2] fix 2 more test files that were accessing file system directly Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 1/2] t1415: avoid direct filesystem access for writing refs Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 2/2] t7509: avoid direct file access for writing CHERRY_PICK_HEAD Han-Wen Nienhuys via GitGitGadget
@ 2021-07-06 19:55 ` Junio C Hamano
2 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2021-07-06 19:55 UTC (permalink / raw)
To: Han-Wen Nienhuys via GitGitGadget; +Cc: git, Han-Wen Nienhuys
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
> This reduced the number of test failures in the reftable series by a bit.
>
> Han-Wen Nienhuys (2):
> t1415: avoid direct filesystem access for writing refs
> t7509: avoid direct file access for writing CHERRY_PICK_HEAD
Thanks. Both look quite sensible.
Will queue.
>
> t/t1415-worktree-refs.sh | 10 ++++------
> t/t7509-commit-authorship.sh | 4 ++--
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
>
> base-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1042%2Fhanwen%2Freftable-tests2-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1042/hanwen/reftable-tests2-v1
> Pull-Request: https://github.com/git/git/pull/1042
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-06 19:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 18:47 [PATCH 0/2] fix 2 more test files that were accessing file system directly Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 1/2] t1415: avoid direct filesystem access for writing refs Han-Wen Nienhuys via GitGitGadget
2021-07-06 18:47 ` [PATCH 2/2] t7509: avoid direct file access for writing CHERRY_PICK_HEAD Han-Wen Nienhuys via GitGitGadget
2021-07-06 19:55 ` [PATCH 0/2] fix 2 more test files that were accessing file system directly Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).