Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-07-06 21:47:57 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-06 22:56:38 +0300
commit52a47aea70875cb64a5a975189d6b5ba35b81574 (patch)
tree16cb27b9677ab56f1f0bc7e9bc8e365c175302c8 /t/t7509-commit-authorship.sh
parentae815940f6efde993083e6e7ae655f8b3d16754c (diff)
t7509: avoid direct file access for writing CHERRY_PICK_HEAD
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7509-commit-authorship.sh')
-rwxr-xr-xt/t7509-commit-authorship.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7509-commit-authorship.sh b/t/t7509-commit-authorship.sh
index ee6c47416e..d568593382 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 &&