{"thread":{"id":"37245","subject":"[PATCH] commit --amend: test specifies authorship but forgets to check","startedAt":"2014-07-30T09:45:11Z","lastAt":"2014-07-30T19:44:30Z","messageCount":2,"participants":["Fabian Ruch","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"246958","messageId":"0ba2fcaf784bb74ee5a9f8d13dce64ab09e66d7b.1406713446.git.bafain@gmail.com","threadId":"37245","inReplyTo":null,"subject":"[PATCH] commit --amend: test specifies authorship but forgets to check","fromName":"Fabian Ruch","fromEmail":"bafain@gmail.com","sentAt":"2014-07-30T09:45:11Z","receivedAt":"2014-07-30T09:45:11Z","isPatch":true,"sender":{"key":"bafain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1150972?v=4"},"body":"The test case \"--amend option copies authorship\" specifies that the\ngit-commit option `--amend` uses the authorship of the replaced\ncommit for the new commit. Add the omitted check that this property\nactually holds.\n\nSigned-off-by: Fabian Ruch <bafain@gmail.com>\n---\nWithout the check, the test case succeeds even with nonsense in the\n`expected` file. An `--amend` implementation which simply uses the\ncommitter name and date as if it was not amending would have been\ndeemed correct. This is not the case, the implementation still passes\nthe test suite after the correction.\n\nQuickly skimming over the rest of the file, I couldn't find the same\nthing twice.\n\n t/t7509-commit.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t7509-commit.sh b/t/t7509-commit.sh\nindex b61fd3c..9ac7940 100755\n--- a/t/t7509-commit.sh\n+++ b/t/t7509-commit.sh\n@@ -77,6 +77,7 @@ test_expect_success '--amend option copies authorship' '\n \tgit commit -a --amend -m \"amend test\" &&\n \tauthor_header Initial >expect &&\n \tauthor_header HEAD >actual &&\n+\ttest_cmp expect actual &&\n \n \techo \"amend test\" >expect &&\n \tmessage_body HEAD >actual &&\n-- \n2.0.1\n"},{"id":"246990","messageId":"xmqqppgmy6ld.fsf@gitster.dls.corp.google.com","threadId":"37245","inReplyTo":"0ba2fcaf784bb74ee5a9f8d13dce64ab09e66d7b.1406713446.git.bafain@gmail.com","subject":"Re: [PATCH] commit --amend: test specifies authorship but forgets to check","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-30T19:44:30Z","receivedAt":"2014-07-30T19:44:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Fabian Ruch <bafain@gmail.com> writes:\n\n> The test case \"--amend option copies authorship\" specifies that the\n> git-commit option `--amend` uses the authorship of the replaced\n> commit for the new commit. Add the omitted check that this property\n> actually holds.\n>\n> Signed-off-by: Fabian Ruch <bafain@gmail.com>\n> ---\n> Without the check, the test case succeeds even with nonsense in the\n> `expected` file. An `--amend` implementation which simply uses the\n> committer name and date as if it was not amending would have been\n> deemed correct. This is not the case, the implementation still passes\n> the test suite after the correction.\n>\n> Quickly skimming over the rest of the file, I couldn't find the same\n> thing twice.\n>\n>  t/t7509-commit.sh | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/t/t7509-commit.sh b/t/t7509-commit.sh\n> index b61fd3c..9ac7940 100755\n> --- a/t/t7509-commit.sh\n> +++ b/t/t7509-commit.sh\n> @@ -77,6 +77,7 @@ test_expect_success '--amend option copies authorship' '\n>  \tgit commit -a --amend -m \"amend test\" &&\n>  \tauthor_header Initial >expect &&\n>  \tauthor_header HEAD >actual &&\n> +\ttest_cmp expect actual &&\n>  \n>  \techo \"amend test\" >expect &&\n>  \tmessage_body HEAD >actual &&\n\nMakes sense; thanks.\n"}]}