git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andrew Ardill <andrew.ardill@gmail.com>
Cc: Anatolii Borodin <anatoly.borodin@gmail.com>,
	Jeff King <peff@peff.net>, Jeffrey Walton <noloader@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: Please fix the useless email prompts
Date: Sun, 20 Aug 2017 16:56:50 -0700	[thread overview]
Message-ID: <xmqqinhh7pz1.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAH5451kcb0Y4mm2U804ruqBewB2AV991Hm0_-8ExdEoDTF8DJw@mail.gmail.com> (Andrew Ardill's message of "Mon, 21 Aug 2017 09:32:24 +1000")

Andrew Ardill <andrew.ardill@gmail.com> writes:

> 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.

I personally do not think it is a good trade-off.

In theory [*1*], it _is_ possible to delay the "the given identity
looks bogus" check so that the underlying "git fetch" is done
without it, and bypass the check when "pull" fast-forwards, as there
is no need for an extra merge commit in such a case as you noticed.
We still do record the bogus identity in the reflog of the HEAD ref,
but IIRC, we do not trigger a severe error when a bogus identity is
only needed for reflogs.

But before running "fetch", you cannot tell if the "pull" will
fast-forward, so such an "optimization" may actually be a net loss
for end users, who have to wait for network delay only to be told
that you'd end up with a history with bogus identity and need to
redo the operation after fixing your identity.  Then after that,
they are likely to do another "git pull", which will avoid the cost
of retransmission of objects if (and only if) the initial "git pull"
uses remote-tracking branches.


[Footnote]

*1* We actually might already do such an "optimization"; I didn't
    check.

  reply	other threads:[~2017-08-20 23:57 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
2017-08-20 23:56             ` Junio C Hamano [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqinhh7pz1.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=anatoly.borodin@gmail.com \
    --cc=andrew.ardill@gmail.com \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).