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

Re: GIT 0.99.7d, and end of week status.

From
Junio C Hamano <junkio@cox.net>
Date
Sep 26, 2005, 20:25 UTC
Message-ID
<7vll1jh8zr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050926191037.GD26340@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> ... Either way, git-pull won't be equivalent to git-fetch &&
> git-merge (or git-resolve or whatever is the core porcelain
> command) anymore.

"pull = fetch + merge" is a reasonable approximation to use when you explain what they are to somebody, but taking it literally would harm usefulness.

It is what you have already lived with for a while. "git pull .../linux/2.6.git v2.6.11-tree v2.6.12" would fetch both heads but merges v2.6.12 head only (because v2.6.11-tree is not something you can merge with).

The typical use cases are:
 - The remote does not have more than one head (majority of the
   kernel.org repositories are single head repositories).  You
   could say "Pull: master:somebody" in .git/remotes/somebody
   and say "git pull somebody" and pull is fetch + merge.  The
   proposed fix does not affect this case.
 - The remote has more than one heads, and they are usually both
   interesting.  Some kernel.org repositories have release and
   test heads and people who are interested in what is happening
   in that subsystem are likely to want to inspect both, so
   fetching both makes a lot of sense (especially given
   multi-head fetch over git-native protocol is more efficieint
   than fetching them separately), but obviously merging both
   into an Octopus does not make any sense most of the time.
   You could say "Pull: release:a/release test:a/test" in
   .git/remotes/subsys and "git fetch subsys" would fetch both
   and store them locally.  "git pull subsys" would fetch both
   but merges only subs/release, which is far more useful than
   attempting to make an Octopus with both heads.  You could
   still say "git pull subsys test" to only fetch and merge
   test, if you needed to do something different from what the
   "merge only the first one by default" rule gives.
 - The remote has 47 different heads, and they are more or less
   independent developments in the same area ("topic branches").
   Jeff's libata-dev repository may be a good example.  "Pull:
   ALL:libata-dev/ALL ncq:libata-dev/ncq
   chs-support:libata-dev/chs-support ..."  would be what one
   would place in .git/remotes/libata-dev.  This list can be a
   subset of the heads that exist at remote but only the heads
   one is interested in.  "git fetch libata-dev" would get all
   the heads in that repository one is interested in, "git pull
   libata-dev" would merge in ALL (which is premerged at the
   remote side) thanks to the "merge only first one by default"
   rule.  If you want to make Octopus with selected heads (not
   the one Jeff made in ALL), you still can say "git pull
   libata-dev ncq chs-support" to do so.
Previous: Petr BaudisNext: Petr Baudis
Message 11 of 23 in “GIT 0.99.7d, and end of week status.”
  1. Junio C HamanoSep 25, 2005
  2. Alan ChandlerSep 25, 2005
  3. Junio C HamanoSep 25, 2005
  4. Alan ChandlerSep 25, 2005
  5. Junio C HamanoSep 26, 2005
  6. Alan ChandlerSep 26, 2005
  7. Junio C HamanoSep 26, 2005
  8. Tom PrinceSep 25, 2005
  9. Junio C HamanoSep 25, 2005
  10. Petr BaudisSep 26, 2005
  11. Junio C HamanoSep 26, 2005
  12. Petr BaudisSep 27, 2005
  13. Matthias UrlichsSep 29, 2005
  14. Junio C HamanoSep 29, 2005
  15. Jon LoeligerSep 26, 2005
  16. Junio C HamanoSep 26, 2005
  17. Fix default pull not to do an unintended Octopus.Junio C Hamano, Sep 27, 2005
  18. Josef WeidendorferSep 27, 2005
  19. Petr BaudisSep 27, 2005
  20. Josef WeidendorferSep 27, 2005
  21. Junio C HamanoSep 27, 2005
  22. Petr BaudisSep 27, 2005
  23. Petr BaudisSep 27, 2005

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.