git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] pull/fetch rename

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2009, 21:46 UTC
Message-ID
<7vpr8hlow9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<200910201359.30880.wjl@icecavern.net>
"Wesley J. Landaker" <wjl@icecavern.net> writes:
Show 24 quoted lines
> On Tuesday 20 October 2009 11:47:45 Thomas Rast wrote:
>> Especially on IRC, we see many people who are some combination of
>> misunderstanding, misusing or overusing git-pull.  I figure this is
>> the result of several factors, notably
>> 
>> a) pull/push are not symmetric,
>> 
>> b) guides/tutorials recommend pull for situations where they
>>    shouldn't,
>> 
>> c) people blindly fire commands at git.
>
> This may be minor, but also:
>
> d) in mercurial, pull/push are symmetric, but fetch means pull+merge
>
>> As you probably guessed by now, here is an idea for a very aggressive
>> transition plan to address (a) in four phases:
>
> I would love to see this change, not because I get confused about pull/fetch 
> (it honestly only took a few days to get used to), but because having 
> push/pull be symmetric just is so much more conceptually pure / easier 
> explain to co-workers / separation between orthogonal operations / 
> satisfying to my inner perfectionist / etc.
Is making "pull" a symmetric opposite of "push" the ultimate goal?
Or is making (or rather "keeping") "pull" useful more important?
It is not even an attitude that values philosophy over utility.

Fundamentally, pull and push cannot be symmetric because nobody is sitting in front of the repository you are pushing into (that is what a "push" is; you push from outside the repository---otherwise you would be "pull"ing from inside it in the other direction), but you know you are sitting in the repository, ready to resolve potential conflicts, when you say "pull".

Your elaborate scheme to make "pull" into "fetch" and to force everybody to set a configuration variable to make it "pull" again sounds like a mindless mental masturbation to me. People who leave "pull.merge = no" will always have to say "pull --merge" or "pull --rebase", so you cannot even argue you are not forcing but giving them a choice.

And you are doing this for what gain? The only thing I can think of is "People who deliberately set 'pull.merge = yes' can no longer blame us for pull not being the opposite of push." I do not consider it as a gain.

I do not buy "People who set 'pull.merge = yes' now understand why pull touches their work tree, because they did it themselves" either. People blindly copy other people's configuration from random web pages without understanding. Besides, the next thing they will ask is "Why is there pull.merge but no push.merge? Wasn't push an opposite of pull?" and you are back to square one.

I would be much more sympathetic if the suggested approach were to make "push" more symmetric to "pull", or at least attempt to allow it to be, by giving it an option to update the associated work tree when it can [*1*].

But I do not know what to say when people say "push cannot update the work tree, so let's make pull not to update the work tree by default---it will make it much less useful so we will fix that regression with yet another configuration option". It's not even funny.

[Footnote]

*1* Obviously you cannot do this most of the time _if_ the work tree has an interactive user sitting in front of it, but in a repository that never allows a non-ff push, with a work tree that is never updated except by such a push, can reasonably be maintained to give an illusion of push being an opposite of pull by fast forwarding the work tree when the push updates HEAD.

Previous: Wesley J. LandakerNext: Thomas Rast
Message 3 of 32 in “[RFC] pull/fetch rename”
  1. Thomas RastOct 20, 2009
  2. Wesley J. LandakerOct 20, 2009
  3. Junio C HamanoOct 20, 2009
  4. Thomas RastOct 20, 2009
  5. Junio C HamanoOct 20, 2009
  6. Wesley J. LandakerOct 21, 2009
  7. Junio C HamanoOct 20, 2009
  8. Nanako ShiraishiOct 20, 2009
  9. Thomas RastOct 20, 2009
  10. Daniel BarkalowOct 20, 2009
  11. Björn SteinbrinkOct 21, 2009
  12. Daniel BarkalowOct 21, 2009
  13. Björn SteinbrinkOct 21, 2009
  14. Daniel BarkalowOct 21, 2009
  15. Junio C HamanoOct 21, 2009
  16. Clemens BuchacherOct 21, 2009
  17. modernize fetch/merge/pull examplesClemens Buchacher, Oct 21, 2009
  18. Junio C HamanoOct 21, 2009
  19. git-merge: forbid fast-forward and up-to-date when --no-commit is givenJunio C Hamano, Oct 21, 2009
  20. Nanako ShiraishiOct 22, 2009
  21. Junio C HamanoOct 22, 2009
  22. git-merge: imply --no-ff when --no-commit is givenJunio C Hamano, Oct 21, 2009
  23. Clemens BuchacherOct 22, 2009
  24. Thomas RastOct 22, 2009
  25. Thomas RastOct 22, 2009
  26. Mike HommeyOct 21, 2009
  27. Junio C HamanoOct 21, 2009
  28. Mike HommeyOct 21, 2009
  29. Junio C HamanoOct 21, 2009
  30. Jeff KingOct 21, 2009
  31. Jeff KingOct 21, 2009
  32. Junio C HamanoOct 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.