Skip to content

Commit

Permalink
t3403: fix commit authorship
Browse files Browse the repository at this point in the history
Setting GIT_AUTHOR_* when committing with --amend will only change the
author if we also pass --reset-author.  This commit is used in some
tests that ensure the author ident does not change when rebasing.
Creating this commit without changing the authorship meant that the
test would not catch regressions that caused rebase to discard the
original authorship information.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
phillipwood authored and gitster committed Aug 13, 2021
1 parent ebf3c04 commit 118ee5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/t3403-rebase-skip.sh
Expand Up @@ -36,7 +36,8 @@ test_expect_success setup '
test_tick &&
GIT_AUTHOR_NAME="Another Author" \
GIT_AUTHOR_EMAIL="another.author@example.com" \
git commit --amend --no-edit -m amended-goodbye &&
git commit --amend --no-edit -m amended-goodbye \
--reset-author &&
test_tick &&
git tag amended-goodbye &&
Expand Down

0 comments on commit 118ee5c

Please sign in to comment.