git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] commit: suggest --amend --reset-author to fix commiter identity

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jan 12, 2011, 18:29 UTC
Message-ID
<1294856954-26841-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<1294754860-17701-1-git-send-email-Matthieu.Moy@imag.fr>

Since the message advise to fix the configuration first, the advantage of this command is that it is cut-and-paste ready, while using --author='...' requires the user to type his name and email a second time.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Sorry, I did a resend the other day, which was plain wrong (I had the
changes in my tree, but sent before commit--amend-ing).
This one should be OK.
 builtin/commit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 22ba54f..03cff5a 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
 "    git config --global user.name \"Your Name\"\n"
 "    git config --global user.email you@example.com\n"
 "\n"
-"If the identity used for this commit is wrong, you can fix it with:\n"
+"After doing this, you may fix the identity used for this commit with:\n"
 "\n"
-"    git commit --amend --author='Your Name <you@example.com>'\n";
+"    git commit --amend --reset-author\n";
 
 static const char empty_amend_advice[] =
 "You asked to amend the most recent commit, but doing so would make\n"
-- 
1.7.4.rc0.2.g3e22c.dirty
Previous: Matthieu MoyNext: Jeff King
Message 9 of 10 in “commit: suggest --amend --reset-author to fix commiter identity”
  1. commit: suggest --amend --reset-author to fix commiter identityMatthieu Moy, Jan 7, 2011
  2. Jonathan NiederJan 7, 2011
  3. Matthieu MoyJan 7, 2011
  4. Jonathan NiederJan 7, 2011
  5. Junio C HamanoJan 7, 2011
  6. Matthieu MoyJan 8, 2011
  7. Jeff KingJan 11, 2011
  8. commit: suggest --amend --reset-author to fix commiter identityMatthieu Moy, Jan 11, 2011
  9. commit: suggest --amend --reset-author to fix commiter identityMatthieu Moy, Jan 12, 2011
  10. Jeff KingJan 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.