Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Marat Radchenko <marat@slonopotamus.org>, git@vger.kernel.org
Subject: Re: Pull is Evil
Date: Wed, 30 Apr 2014 15:45:23 -0400
Message-ID: <536152D3.5050107@xiplink.com> (raw)
In-Reply-To: <xmqqppjyhnom.fsf@gitster.dls.corp.google.com>

On 14-04-30 10:55 AM, Junio C Hamano wrote:
> Marc Branchaud <marcnarc@xiplink.com> writes:
> 
>> But I'm definitely biased because I think pull is pretty much broken:
>>
>> * New users are encouraged to use pull, but all too often the default
>> fetch-then-merge behaviour doesn't match their expectations and they end up
>> starting threads like this one on the mailing list.
>>
>> * If we change pull's default behaviour, we'll just be shifting the
>> mismatched expectations onto the other half of the new users who would be
>> happy with fetch-then-merge.
>>
>> * I'm not sure why new users are taught to use pull.  I suspect it's because
>> it tries to hide the idea of local-vs-remote branches, and people writing git
>> tutorials don't want to overwhelm new users with what seems to be an internal
>> detail.  But these notions are really fundamental to using git effectively,
>> and I think pull does everyone a disservice by trying to gloss them over.
>>
>> Anyway, rather than ranting on I'll just suggest that there's not enough
>> commonality between the ways people use git to make it worthwhile trying to
>> teach pull how to deal with a significant number of them.  I think the pull
>> command should be deprecated and quietly retired as a failed experiment.
> 
> I almost agree with the first sentence in the last paragraph, and
> your bulletted list above supports it.
> 
> I am not sure how the second sentence can follow as its consequence.
> 
> If the conclusion were "maybe adding a 'git update' to match the
> expectation of those who build on top of the work of others (aka
> CVS/SVN style) more  closely and teaching new users to use that
> instead of 'git pull' may be a good way forward", I can sort of
> understand (if I may not be able to immediately agree with, until I
> can regurgitate the ramifications of such a change) it.

(Yum!  You know, regurgitated ramifications aren't just for breakfast
anymore... :) )

I think we would run into much the same problem with "git update" as we do
with "git pull".  To wit, any "git pull" (or "git update") implementation
needs to make certain workflow assumptions.  I think that no matter which
assumptions are made, there will always be a significant proportion of new
users[1] for whom the assumptions are wrong.

This is why the command is broken.  It's also why the "let's change git pull"
discussions never seem to get anywhere:  Attempting to make the command work
in new user X's environment will make it not work in new user Y's.  Whatever
change is made to "git pull", after a few months new user Y comes along and
says it's wrong.

And now we're seeing third-party tools, like TortoiseGit, using "git pull"
(or the default "git pull" workflow model) and exposing yet more new users to
workflow dissonance.

I don't think we'll ever be able to create a One "Git Pull" To Rule Them All.
 At best we'll end up with something with enough knobs that it could be
configured to work in most workflows (I think we're actually pretty close to
that).  But for new users that defeats the purpose.  It means that "git pull"
is really an advanced command, and beginners should avoid it until they
understand enough of git to configure it properly.

So rather than perpetuate the myth that one command can always (or even just
usually) do the right thing, let's just retire the command.

All that said, I don't object to any attempts at improving the command
either.  But I also don't see any kind of improvement that would lead me to
start using "git pull" let alone recommending it to new users.

		M.

[1] By "significant" I mean "enough to perpetually create new mailing list
threads about changing 'git pull'".

  reply index

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  6:29 A failing attempt to use Git in a centralized environment Marat Radchenko
2014-04-28 18:41 ` Junio C Hamano
2014-04-30 14:21   ` Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment) Marc Branchaud
2014-04-30 14:55     ` Junio C Hamano
2014-04-30 19:45       ` Marc Branchaud [this message]
2014-04-30 20:01         ` Pull is Evil Jonathan Nieder
2014-04-30 20:01         ` Junio C Hamano
2014-04-30 21:48           ` Marc Branchaud
2014-05-02  7:40           ` Andreas Krey
2014-05-02  8:46             ` David Kastrup
2014-05-03  6:17               ` Andreas Krey
2014-05-03  6:55                 ` David Kastrup
2014-04-30 20:14         ` Felipe Contreras
2014-04-30 22:06           ` Marc Branchaud
2014-04-30 22:25             ` Felipe Contreras
2014-05-01  9:46               ` brian m. carlson
2014-05-01 10:48                 ` Felipe Contreras
2014-05-01 15:16                   ` Junio C Hamano
2014-05-01 19:16                     ` Felipe Contreras
2014-05-01 19:48                       ` W. Trevor King
2014-05-01 20:07                         ` W. Trevor King
2014-05-01 23:25                           ` Felipe Contreras
2014-05-02  0:02                             ` W. Trevor King
2014-05-02  0:37                               ` Felipe Contreras
2014-05-02  1:10                                 ` W. Trevor King
2014-05-02  1:14                                   ` Felipe Contreras
2014-05-02 14:54                                     ` W. Trevor King
2014-05-02 18:55                                       ` Felipe Contreras
2014-05-02 19:07                                         ` W. Trevor King
2014-05-02 19:10                                           ` David Kastrup
2014-05-02 19:13                                           ` Felipe Contreras
2014-05-02 19:46                                             ` W. Trevor King
2014-05-02 20:34                                               ` Felipe Contreras
2014-05-02 21:13                                                 ` W. Trevor King
2014-05-02 21:18                                                   ` Felipe Contreras
2014-05-02 22:01                                                     ` pull.prompt or other way to slow/disable 'git pull' (was: Pull is Evil) W. Trevor King
2014-05-02 22:20                                                       ` Felipe Contreras
2014-05-03  0:05                                                         ` pull.prompt or other way to slow/disable 'git pull' W. Trevor King
2014-05-03  9:50                                                           ` Felipe Contreras
2014-05-04 18:51                                                             ` W. Trevor King
2014-05-04 20:54                                                               ` Felipe Contreras
2014-05-01 23:20                         ` Re: Pull is Evil Felipe Contreras
2014-05-01 15:20                 ` Marc Branchaud
2014-05-01 17:56                   ` W. Trevor King
2014-05-01 18:04                     ` Marc Branchaud
2014-05-01 18:30                       ` W. Trevor King
2014-05-01 20:21                         ` Marc Branchaud
2014-05-01 23:28                           ` Felipe Contreras
2014-05-02  7:16                           ` Andreas Krey
2014-05-02  8:14                             ` Felipe Contreras
2014-05-02 19:29                           ` Junio C Hamano
2014-05-02 19:53                             ` Junio C Hamano
2014-05-01 23:45                       ` brian m. carlson
2014-05-01 23:39                         ` Felipe Contreras
2014-05-01 19:22                   ` Felipe Contreras
2014-05-01 19:43                     ` Marc Branchaud
2014-05-01 19:27                 ` Felipe Contreras
2014-05-01 21:06         ` Philip Oakley
2014-05-01 21:16           ` Philip Oakley
2014-05-01 23:34           ` Felipe Contreras
2014-05-01 23:59             ` W. Trevor King
2014-05-02  0:31               ` Felipe Contreras
2014-04-30 16:47     ` Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment) Felipe Contreras
2014-04-30 17:09       ` Pull is Evil Matthieu Moy
2014-04-30 18:31         ` Felipe Contreras
2014-04-30 19:10           ` Junio C Hamano
2014-04-30 19:32             ` Felipe Contreras
2014-04-30 19:53               ` Junio C Hamano
2014-04-30 20:11                 ` Felipe Contreras
2014-04-30 16:12 ` A failing attempt to use Git in a centralized environment Stepan Kasal
2014-04-30 17:15 ` Geert Bosch
2014-05-04  8:58   ` John Szakmeister
2014-05-02 20:56 ` Max Kirillov

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=536152D3.5050107@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=marat@slonopotamus.org \
    /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

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git