提交 d63c2fd1 编写于 作者: K Kristian Høgsberg 提交者: Junio C Hamano

Add testcase for amending and fixing author in git commit.

We used to clobber author time, but we shouldn't.
Signed-off-by: NKristian Høgsberg <krh@redhat.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 193f7e98
......@@ -242,4 +242,19 @@ test_expect_success 'multiple -m' '
'
author="The Real Author <someguy@his.email.org>"
test_expect_success 'amend commit to fix author' '
oldtick=$GIT_AUTHOR_DATE &&
test_tick &&
git reset --hard &&
git cat-file -p HEAD |
sed -e "s/author.*/author $author $oldtick/" \
-e "s/^\(committer.*> \).*$/\1$GIT_COMMITTER_DATE/" > \
expected &&
git commit --amend --author="$author" &&
git cat-file -p HEAD > current &&
diff expected current
'
test_done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册