git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Ardill <andrew.ardill@gmail.com>
To: Anatolii Borodin <anatoly.borodin@gmail.com>
Cc: Jeff King <peff@peff.net>, Jeffrey Walton <noloader@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git List <git@vger.kernel.org>
Subject: Re: Please fix the useless email prompts
Date: Mon, 21 Aug 2017 09:32:24 +1000	[thread overview]
Message-ID: <CAH5451kcb0Y4mm2U804ruqBewB2AV991Hm0_-8ExdEoDTF8DJw@mail.gmail.com> (raw)
In-Reply-To: <CACNzp2kao+hu6a2nO=gVaLctzoDauB+xyj=cfQLUdNOXTNKQfQ@mail.gmail.com>

Hi Anatoli,

On 21 August 2017 at 07:57, Anatolii Borodin <anatoly.borodin@gmail.com> wrote:
> On Sun, Aug 20, 2017 at 2:40 PM, Andrew Ardill <andrew.ardill@gmail.com> wrote:
>> Maybe I am missing something obvious, but if that's the case then
>> can't we just do the identity check when trying to make new commits,
>> in which case you should be able to pull without setting your
>> identity?
>
> `git pull` is `git fetch + git merge / git rebase` in disguise, so we
> should be ready if git will want to create a merge commit or do a
> rebase automatically (and potentially create new commits with
> `Committer` set to the current user). `git fetch` and `git clone`
> alone, `git branch`, `git checkout` etc don't care about the email (as
> of 2.14.1), even if `user.useConfigOnly` is set to `true`.

Is there any reason `git pull` can't delay that check until the point
where it actually tries to create a new commit? It's fair enough to
error if a new commit needs to be made, and there is no user
configured, but for the use cases discussed here it seems a little
eager to error on the chance that the user will be needed.

It seems nicer for the user if the `git fetch` happens first, and if
the merge is not a fast forward, and there is no user configured, that
the error pops then. I don't know if this idea of "do as much as
possible before erroring" is consistent with any other errors we
handle.

Regards,

Andrew Ardill

  reply	other threads:[~2017-08-20 23:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19 15:10 Please fix the useless email prompts Jeffrey Walton
2017-08-19 16:36 ` Junio C Hamano
2017-08-19 18:02   ` Jeffrey Walton
2017-08-19 19:17     ` Patryk Obara
2017-08-20  9:18     ` Jeff King
2017-08-20 10:19       ` Kaartic Sivaraam
2017-08-20 12:40       ` Andrew Ardill
2017-08-20 21:57         ` Anatolii Borodin
2017-08-20 23:32           ` Andrew Ardill [this message]
2017-08-20 23:56             ` Junio C Hamano
2017-08-23 15:35               ` Jeff King
2017-08-23 17:36                 ` Junio C Hamano
2017-08-20 21:50 ` Anatolii Borodin

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=CAH5451kcb0Y4mm2U804ruqBewB2AV991Hm0_-8ExdEoDTF8DJw@mail.gmail.com \
    --to=andrew.ardill@gmail.com \
    --cc=anatoly.borodin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=noloader@gmail.com \
    --cc=peff@peff.net \
    /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).