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 21, 2009, 06:22 UTC
Message-ID
<7vk4ypb71j.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091021030608.GA18997@atjola.homenet>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
> So that's ten days of #git. I left out a bunch of duplications (most
> were "pull == fetch", "pull == update" and "pull to update
> non-checked-out branch").

Interesting; this shows that people who do not understand what "pull" does expect different behaviour from "pull", use the word "pull" to express what they want to happen, expect other people interpret the word to mean the way they think it does. At the same time, judging from different behaviour expected by these people, push/pull asymmetry does not seem to have much to do with the confusion. If the verb used by people who know git to call this operation were "distim", these people would also say "distim" and expect different things from it. I would foresee exactly the same problem if the verb were "update" for that matter.

It is just natural, as everybody learns a new language by listening how others talk and by imitating them.

Another thing I noticed while lurning on the #git channel for the past few days is that too much flexibility actually hurts new people. They do not want flexibility, but want to follow a set recipe. It just overwhelms to get too much flexibility upfront without enough guidance.

And there are too much historical flexibility that remain merely for historical reasons. We more or less killed the concept of separate object store and $GIT_DIR (i.e.one objects/ directory shared between more than one .git/ directories) when we made receive-pack aware of alternate repository information---it used to be that objects/ directory did not belong to a single set of refs/ hierarchy, but now it does and the receiving end of "git push" uses that knowledge to tell the sender what not to send in order to minimize the transfer. We will be gradually killing other kinds of historical flexibility that do not buy much in practice anymore, and that would reduce the issue of overwhelming flexibility.

For example, I am in favor of deprecating the "pull $there $src:$dst" notation. Before we standardized on the separate remote layout, it was sometimes handy to be able to use $dst that is a local branch, but these days, especially when repository $there has remote.$there.fetch mapping configured so that we can compute from $src what remote tracking branch we should store the fetched commit, the flexibility is more confusing than it is useful. "pull $there $src" (and "pull $there $src1 $src2" to build an octopus) should stay, but even there, it probably is a good idea for these notations to start updating remote tracking branches for $src ($src1 and $src2 in the octopus case) if the repository is configured to track them anyway, to match what "pull $there" that uses the default configuration does.

I am actually even Ok, at least in the long run (like in 3 years), if we were to deprecate the refspecs with colon given on the command line to "pull" and "fetch" altogether [*1*]. The rule will become "if you are going to use tracking branches to store what you fetch, you _must_ always have the tracking mapping defined in remote.$there.fetch configuration, and the location where one particular branch from the remote is stored is always determined by that mapping." It robs us the flexibility to fetch my 'next' and store it to your 'next' branch today and to your 'mext' branch tomorrow, and instead you would need to first fetch and then do an explicit "git branch mext origin/next" if you really want to do so, but I think the flexibility outlived its usefulness --- the primary value of these kinds of flexibility is to experiment with various workflows and UI concepts they allow, but I think we have gained enough experience to start judging what works (and is useful) and what doesn't (and is Ok to make it much more cumbersome to make or even impossible to do).

[Footnote]

*1* Except perhaps when deleting branches from the remote with "push", but even there we _could_ force people to do a deleting push separate from normal push and say "push --delete $there $this $and $that".

Previous: Daniel BarkalowNext: Clemens Buchacher
Message 15 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.