From: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
To: "Marcus Tillmanns" <Marcus.Tillmanns@qt.io>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: Bug: Commit fails when no global email address is set even though --author is used
Date: Fri, 09 Feb 2024 12:02:43 +0100 [thread overview]
Message-ID: <5c25da43-c886-41d2-b057-b95a84b107ba@app.fastmail.com> (raw)
In-Reply-To: <26317088-7020-43EF-8B60-41D719A6D145@qt.io>
On Fri, Feb 9, 2024, at 09:46, Marcus Tillmanns wrote:
> Everything you said is true. But it misses the point.
>
> If I try to commit for the first time, don’t want to set the global
> config, look at man git-commit and search for “author", it says
> “—author” to specify the author.
That reminds me of a mistake I once did. I was setting things up on a
different machine and I set `author.*` in my config. Then I got very
confused when `git commit` complained. I totally failed to see that I
need to set `user.*`, not `author.*`.
Ideally I think I should have gotten this error:
```
Committer identity unknown
The `author` config is set but not `committer`.
Did you mean to set `user` (author and committer)?
```
> Since “comitter” is such a hidden feature that even long time users of
> git don’t necessarily know about it, when I then specify “—author” and
> get the “same” error message again, I have no clue what’s going on,
> since I just specified my user name and email, and still I’m told it
> cannot be determined.
This is a very good point. The _committer_ is pretty well-hidden in
normal workflows. And probably irrelevant.
So when a user gets this error:
```
Committer identity unknown
*** Please tell me who you are.
```
And have never heard of “committer” before… what is she to think? I
think it’s very natural to conclude that “author” and “committer” are
the same thing. So she thinks:
“ Okay, so the program is complaining about the author not being
set. (It calls it “committer” here for some reason.) But I have set
the author…
Maybe this is another case of: it all makes perfect sense if you already
know all the concepts.
>> Your report would have been more clear if you included the error:
>
> Had I had any idea that the report was different between with / without
> —author I probably would have added it, or found out what the issue was.
You don’t know what you don’t know. That’s why it’s best to include all
context.
Cheers
--
Kristoffer Haugsbakk
next prev parent reply other threads:[~2024-02-09 11:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c25da43-c886-41d2-b057-b95a84b107ba@app.fastmail.com \
--to=code@khaugsbakk.name \
--cc=Marcus.Tillmanns@qt.io \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).