git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* "commit --author=..." does not work if global email and name is not set
@ 2019-04-05  7:34 Piotr Krukowiecki
  2019-04-05  8:11 ` Junio C Hamano
  2019-04-06 18:25 ` Jakub Narebski
  0 siblings, 2 replies; 10+ messages in thread
From: Piotr Krukowiecki @ 2019-04-05  7:34 UTC (permalink / raw)
  To: git

Hi,

I have a repo downloaded on machines which do automatic tests.
Sometimes I want to make a quick fix there and push back to origin.
Reading git-commit docs I had impression that I can use "--author=me"
and it will work. But it requires setting global user name and email:

========================================================
$ git commit --author=pkruk

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'some@default.(none)')
========================================================

I do not want to set the default name/email, because I want commits to
have real names, and not some "automatic test account" info. For
pushing back to origin I already have to use a read-write SSH key, but
lack of default name/email would prevent accidental commits (people
WILL forget to use --author ...).

Do you think changing git to not require default name/email if
"--author" is specified is possible (and hopefully easy and quick to
implement ;))?

Thanks,

-- 
Piotr Krukowiecki

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-09  7:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-05  7:34 "commit --author=..." does not work if global email and name is not set Piotr Krukowiecki
2019-04-05  8:11 ` Junio C Hamano
2019-04-06 18:25 ` Jakub Narebski
2019-04-08  6:57   ` Junio C Hamano
2019-04-08  9:54     ` Piotr Krukowiecki
2019-04-08 11:06       ` Jakub Narebski
2019-04-08 11:55         ` Piotr Krukowiecki
2019-04-09  6:31           ` Junio C Hamano
2019-04-09  7:03             ` Piotr Krukowiecki
2019-04-09  7:43           ` Jakub Narebski

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).