Re: [PATCH] ident: say whose identity is missing when giving user.name hint
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 21, 2020, 20:52 UTC
- Message-ID
- <CAPig+cR12i8KQjiWYm8DGuAc9BfJqanmNBZcZfwHGsrt2hW3Dw@mail.gmail.com>
- In-Reply-To
- <xmqq5z9b91o3.fsf_-_@gitster.c.googlers.com>
On Fri, Aug 21, 2020 at 4:36 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> When the author or the committer identity is missing when required,
> "git" errors out with a message that suggests to set these
> configuration variables at the per-user level as the easiest way
> forward. This message is given to a brand-new user, whose
> ~/.gitconfig hasn't been configured for user.name and user.email,
> who runs "git commit --author=...", too, but such a user may find it
> confusing ("why? I just gave you a name and e-mail").
>
> State whose identity is missing as the reason why we are erroring
> out, when we give the hint, to help reduce the confusion.I had trouble following the first paragraph due to the run-on nature of the second sentence. Perhaps the entire message could be rewritten something like this:
If `user.name` and `user.email` have not been configured and the
user invokes:git commit --author=...
without without specifying `--committer=`, then Git errors out
with a message asking the user to configure `user.name` and
`user.email` but doesn't tell the user which attribution was
missing. This can be confusing for a user new to Git who isn't
aware of the distinction between user, author, and committer.
Give such users a bit more help by extending the error message to
also say which attribution is expected.