{"thread":{"id":"10657","subject":"[PATCH] t7501-commit.sh: Add test case for fixing author in amend commit.","startedAt":"2007-11-05T03:42:45Z","lastAt":"2007-11-05T21:23:24Z","messageCount":4,"participants":["Kristian Høgsberg","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"58334","messageId":"1194234165-9498-1-git-send-email-krh@redhat.com","threadId":"10657","inReplyTo":null,"subject":"[PATCH] t7501-commit.sh: Add test case for fixing author in amend commit.","fromName":"Kristian Høgsberg","fromEmail":"krh@redhat.com","sentAt":"2007-11-05T03:42:45Z","receivedAt":"2007-11-05T03:42:45Z","isPatch":true,"sender":{"key":"krh@redhat.com","avatar":"https://gravatar.com/avatar/763dee6f9594ac474f725b137a39565792928e583ddf59b32befc2907409027e?d=mp&s=160"},"body":"Signed-off-by: Kristian Høgsberg <krh@redhat.com>\n---\n t/t7501-commit.sh |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex b151b51..7a37c13 100644\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -151,6 +151,7 @@ test_expect_success 'partial commit that involves removal (2)' '\n \tdiff expected current\n \n '\n+test_tick\n \n test_expect_success 'partial commit that involves removal (3)' '\n \n@@ -163,4 +164,19 @@ test_expect_success 'partial commit that involves removal (3)' '\n \n '\n \n+oldtick=$GIT_AUTHOR_DATE\n+test_tick\n+\n+author=\"The Real Author <someguy@his.email.org>\"\n+committer=\"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\"\n+\n+test_expect_success 'amend commit to fix author' '\n+\n+\tgit reset --hard\n+\tgit cat-file -p HEAD | sed -e \"s/author.*/author $author $oldtick/\" -e \"s/committer.*/committer $committer/\" > expected &&\n+\tgit commit --amend --author=\"$author\" &&\n+\tgit cat-file -p HEAD > current &&\n+\tdiff expected current\n+\t\n+'\n test_done\n-- \n1.5.3.5.1527.g6161-dirty\n"},{"id":"58357","messageId":"Pine.LNX.4.64.0711051020330.4362@racer.site","threadId":"10657","inReplyTo":"1194234165-9498-1-git-send-email-krh@redhat.com","subject":"Re: [PATCH] t7501-commit.sh: Add test case for fixing author in amend commit.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-05T10:24:58Z","receivedAt":"2007-11-05T10:24:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 4 Nov 2007, Kristian Høgsberg wrote:\n\n> +test_tick\n>  \n>  test_expect_success 'partial commit that involves removal (3)' '\n\nWe usually put the test_tick into the test case.  IOW\n\n\ttest_expect_success 'message' '\n\t\ttest_tick &&\n\t\t...\n\n>  '\n>  \n> +oldtick=$GIT_AUTHOR_DATE\n> +test_tick\n> +\n> +author=\"The Real Author <someguy@his.email.org>\"\n> +committer=\"$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\"\n> +\n> +test_expect_success 'amend commit to fix author' '\n\nSame here.\n\nBTW: is this committer mangling really necessary? I thought only \nGIT_COMMITTER_DATE was relevant.  And that is easily replaced by\n\n\tsed -e \"s/^\\(committer.* \\)[0-9][0-9]*$/\\1$GIT_COMMITTER_DATE/\"\n\nCiao,\nDscho\n"},{"id":"58393","messageId":"1194283047-16565-1-git-send-email-krh@redhat.com","threadId":"10657","inReplyTo":"Pine.LNX.4.64.0711051020330.4362@racer.site","subject":"[PATCH] t7501-commit.sh: Add test case for fixing author in amend commit.","fromName":"Kristian Høgsberg","fromEmail":"krh@redhat.com","sentAt":"2007-11-05T17:17:27Z","receivedAt":"2007-11-05T17:17:27Z","isPatch":true,"sender":{"key":"krh@redhat.com","avatar":"https://gravatar.com/avatar/763dee6f9594ac474f725b137a39565792928e583ddf59b32befc2907409027e?d=mp&s=160"},"body":"Signed-off-by: Kristian Høgsberg <krh@redhat.com>\n---\n\nHow about this?\n\n t/t7501-commit.sh |   15 +++++++++++++++\n 1 files changed, 15 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex b151b51..c5d122f 100644\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -163,4 +163,19 @@ test_expect_success 'partial commit that involves removal (3)' '\n \n '\n \n+author=\"The Real Author <someguy@his.email.org>\"\n+test_expect_success 'amend commit to fix author' '\n+\n+\toldtick=$GIT_AUTHOR_DATE &&\n+\ttest_tick &&\n+\tgit reset --hard &&\n+\tgit cat-file -p HEAD |\n+\tsed -e \"s/author.*/author $author $oldtick/\" \\\n+\t\t-e \"s/^\\(committer.*> \\).*$/\\1$GIT_COMMITTER_DATE/\" > \\\n+\t\texpected &&\n+\tgit commit --amend --author=\"$author\" &&\n+\tgit cat-file -p HEAD > current &&\n+\tdiff expected current\n+\t\n+'\n test_done\n-- \n1.5.3.4\n"},{"id":"58420","messageId":"7vpryoo08j.fsf@gitster.siamese.dyndns.org","threadId":"10657","inReplyTo":"1194283047-16565-1-git-send-email-krh@redhat.com","subject":"Re: [PATCH] t7501-commit.sh: Add test case for fixing author in amend commit.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-05T21:23:24Z","receivedAt":"2007-11-05T21:23:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kristian Høgsberg <krh@redhat.com> writes:\n\n> Signed-off-by: Kristian Høgsberg <krh@redhat.com>\n> ---\n>\n> How about this?\n\nLooks Ok; will queue.\n\nThanks.\n"}]}