Skip to content

Commit 52a47ae

Browse files
hanwengitster
authored andcommitted
t7509: avoid direct file access for writing CHERRY_PICK_HEAD
Signed-off-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae81594 commit 52a47ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t7509-commit-authorship.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '
147147
test_tick &&
148148
git commit -am "cherry-pick 1" --author="Cherry <[email protected]>" &&
149149
git tag cherry-pick-head &&
150-
git rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&
150+
git update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&
151151
echo "This is a MERGE_MSG" >.git/MERGE_MSG &&
152152
echo "cherry-pick 1b" >>foo &&
153153
test_tick &&
@@ -162,7 +162,7 @@ test_expect_success 'commit respects CHERRY_PICK_HEAD and MERGE_MSG' '
162162
'
163163

164164
test_expect_success '--reset-author with CHERRY_PICK_HEAD' '
165-
git rev-parse cherry-pick-head >.git/CHERRY_PICK_HEAD &&
165+
git update-ref CHERRY_PICK_HEAD $(git rev-parse cherry-pick-head) &&
166166
echo "cherry-pick 2" >>foo &&
167167
test_tick &&
168168
git commit -am "cherry-pick 2" --reset-author &&

0 commit comments

Comments
 (0)