git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Marcus Tillmanns <Marcus.Tillmanns@qt.io>
Cc: Kristoffer Haugsbakk <code@khaugsbakk.name>,
	 "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: Sat, 10 Feb 2024 09:21:10 -0800	[thread overview]
Message-ID: <xmqqo7cob5h5.fsf@gitster.g> (raw)
In-Reply-To: <8DDFD548-1540-4E41-8AA3-84E273372F01@qt.io> (Marcus Tillmanns's message of "Sat, 10 Feb 2024 09:42:25 +0000")

Marcus Tillmanns <Marcus.Tillmanns@qt.io> writes:

> For me the issue was that I knew already about the global config
> setting, but in my case I specifically did not want to set that.
>
> What pulled my attention away from the important part was the huge
> wall of text about how to setup global stuff etc, making the
> single word in the top left basically invisible to my eye. I was
> thinking "I already knew all that, I’ve set the author, so you
> complaining still with the same error message must be a bug”.
>
> I think, if a user tries to commit with “—author”, and git
> fails to figure out the comitter, it should have a specific error
> message about “hey, you’ve set the author, but we still have to
> figure out whom to set as the committer, or you can use
> “—authorAndComitter” if they should be the same”.
>
> That would make it obvious to the user what’s going on.

I guess so, provided that such an additional text would not trigger
the "I missed due to the huge wall of text" again.  So in short, you
are saying that the three-way message would help?

Can I get you intereseted enough to care to come up with a patch
;-)?

Thanks.

>>>> Or do we need three-way switch that does
>>>> 
>>>>     if (neither is known) {
>>>>             printf("neither author or committer is known");
>>>>     } else if (author is known but committer is not known) {
>>>>             printf("author is known but committer is not"):
>>>>     } else if (author is not known but committer is known) {
>>>>             printf("committer is known but author is not"):
>>>>     } else {
>>>>             return happy;
>>>>     }
>>>> 
>>>>     printf("please tell us who you are...");
>>>> 
>>>> perhaps?

  reply	other threads:[~2024-02-10 17:21 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
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 [this message]
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=xmqqo7cob5h5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Marcus.Tillmanns@qt.io \
    --cc=code@khaugsbakk.name \
    --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).