git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: Commit fails when no global email address is set even though --author is used
@ 2024-02-08 15:26 Marcus Tillmanns
  2024-02-08 15:50 ` Phillip Wood
  0 siblings, 1 reply; 13+ messages in thread
From: Marcus Tillmanns @ 2024-02-08 15:26 UTC (permalink / raw)
  To: git@vger.kernel.org

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@email.com>"

What did you expect to happen? (Expected behavior)

A commit should be created with author name "My Name", and author email "my@email.com"

What happened instead? (Actual behavior)

An error is thrown, complaining about not being able to determine the email address

What's different between what you expected and what actually happened?

The email should have been taken from the "--author" argument, but instead the commit failed.

Anything else you want to add:

This does not happen if your hostname contains a ".", e.g. "myhostname.local"

[System Info]
git version:
git version 2.40.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan  9 17:03:36 UTC 2024 x86_64
compiler info: gnuc: 12.3
libc info: glibc: 2.38
$SHELL (typically, interactive shell): /bin/bash

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

end of thread, other threads:[~2024-02-11 18:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 15:26 Bug: Commit fails when no global email address is set even though --author is used Marcus Tillmanns
2024-02-08 15:50 ` Phillip Wood
2024-02-09  7:43   ` Marcus Tillmanns
2024-02-09  8:21     ` Konstantin Khomoutov
2024-02-09  8:37     ` Kristoffer Haugsbakk
2024-02-09  8:46       ` Marcus Tillmanns
2024-02-09 11:02         ` Kristoffer Haugsbakk
2024-02-09 17:30           ` Junio C Hamano
2024-02-09 17:38             ` Kristoffer Haugsbakk
2024-02-09 19:56               ` Junio C Hamano
2024-02-10  9:42                 ` Marcus Tillmanns
2024-02-10 17:21                   ` Junio C Hamano
2024-02-11 18:16                 ` Kristoffer Haugsbakk

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 NNTP newsgroup(s).