Re: Bug: Commit fails when no global email address is set even though --author is used

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

 



Uff, that’s a mean trap. Especially since there is no “—committer” option as far as I can see.
Also the difference between the two error messages is just one (the first) word.

Maybe that could be made more obvious, especially if the user specifies “—author” already.

Thanks for the info!

- Marcus 

> On 8. Feb 2024, at 16:50, Phillip Wood <phillip.wood123@xxxxxxxxx> wrote:
> 
> [You don't often get email from phillip.wood123@xxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Hi Marcus
> 
> On 08/02/2024 15:26, Marcus Tillmanns wrote:
>> What did you do before the bug happened? (Steps to reproduce your issue)
>> 
>> * Set your machines hostname to a name that does not contain "." (e.g. "ihavenodotinmyhostname")
>> * Make sure you have no name or email configured in your global git config
>> * Create a new repository and "git add" a file
>> * Run: git commit -m "Test" --author "My Name <my@xxxxxxxxx>"
>> 
>> What did you expect to happen? (Expected behavior)
>> 
>> A commit should be created with author name "My Name", and author email "my@xxxxxxxxx"
>> 
>> What happened instead? (Actual behavior)
>> 
>> An error is thrown, complaining about not being able to determine the email address
> 
> This is expected as "git commit" needs an identity to use for the
> committer as well as for the author. To set the committer you can use
> the GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables if
> you don't have the relevant config set and git cannot extract a domain
> from your hostname.
> 
> Best Wishes
> 
> Phillip






[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