@matheusbsbs / matheus-bagliano / commits / 3f14246899
Fork 0

commit: suggest --amend --reset-author to fix commiter identity

Since the message advises to fix the configuration first, the advantage of using this command is that it is cut-and-paste ready, while using --author='...' requires the user to type his name and email again. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed Jan 12, 2011 at 19:29 UTC 3f142468997f9d14d8051a96b2e9db265d41ac0d
1 file changed +2 -2
builtin/commit.c
+2 -2
@@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
45 " git config --global user.name \"Your Name\"\n"
46 " git config --global user.email you@example.com\n"
47 "\n"
48 -"If the identity used for this commit is wrong, you can fix it with:\n"
48 +"After doing this, you may fix the identity used for this commit with:\n"
49 "\n"
50 -" git commit --amend --author='Your Name <you@example.com>'\n";
50 +" git commit --amend --reset-author\n";
51
52 static const char empty_amend_advice[] =
53 "You asked to amend the most recent commit, but doing so would make\n"