The test case "--amend option copies authorship" specifies that the
git-commit option `--amend` uses the authorship of the replaced
commit for the new commit. Add the omitted check that this property
actually holds.

Signed-off-by: Fabian Ruch <>
Without the check, the test case succeeds even with nonsense in the
`expected` file. An `--amend` implementation which simply uses the
committer name and date as if it was not amending would have been
deemed correct. This is not the case, the implementation still passes
the test suite after the correction.

Quickly skimming over the rest of the file, I couldn't find the same
thing twice.

 t/ | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/ b/t/
index b61fd3c..9ac7940 100755
--- a/t/
+++ b/t/
@@ -77,6 +77,7 @@ test_expect_success '--amend option copies authorship' '
        git commit -a --amend -m "amend test" &&
        author_header Initial >expect &&
        author_header HEAD >actual &&
+       test_cmp expect actual &&
        echo "amend test" >expect &&
        message_body HEAD >actual &&

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to