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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:50:21

Jonathan Nieder [off-list ref] writes:
This message gets used when the author was set from gecos because
not available in the configuration.
The complete message says:

"Your name and email address were configured automatically based\n"
"on your username and hostname. Please check that they are accurate.\n"
"You can suppress this message by setting them explicitly:\n"
"\n"
"    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"
"\n"
"    git commit --amend --author='Your Name [off-list ref]'\n"
"\n"
"or\n"
"\n"
"    git commit --amend --reset-author\n";

So, the natural thing to do is

git config --global user.name "me"
git config --global user.email "my.email@bla.com"
git commit --amend --reset-author

and it's not necessary to use the longer

git config --global user.name "me"
git config --global user.email "my.email@bla.com"
git commit --amend --author='me [off-list ref]'

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:21

Matthieu Moy wrote:
The complete message says:

"Your name and email address were configured automatically based\n"
"on your username and hostname. Please check that they are accurate.\n"
"You can suppress this message by setting them explicitly:\n"
"\n"
"    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"
"\n"
"    git commit --amend --author='Your Name [off-list ref]'\n"
Sloppy reading on my part.  So the original text explains:

	how to configure your identity globally
	how to change the identity for a single commit
"\n"
"or\n"
"\n"
"    git commit --amend --reset-author\n";
Maybe:

	If the identity used for this commit is wrong, you can fix it:

	    git commit --amend --author='Patch Submitter [off-list ref]'

	To just use your newly configured identity:

	    git commit --amend --reset-author

(modulo wording).  The idea being to make it clear to the user why we
are telling two ways to do the same thing.

Sorry for the nonsense.
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help