mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
Merge branch 'hn/refs-test-cleanup'
Test clean-up. * hn/refs-test-cleanup: t7509: avoid direct file access for writing CHERRY_PICK_HEAD t1415: avoid direct filesystem access for writing refs
This commit is contained in:
commit
c4670b8a8d
|
@ -40,9 +40,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
|
||||
'
|
||||
|
@ -54,9 +53,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
|
||||
'
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue