"commit --author=..." does not work if global email and name is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx"
  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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux