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 25, 2005, 23:46 UTC
Message-ID
<7v7jd4n22i.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<87psqwzs3x.fsf@ualberta.net>
Tom Prince <tom.prince@ualberta.net> writes:
Show 12 quoted lines
>> When you already have a repository to track git.git, I would
>> recommend to have something like this in .git/remote/origin:
>>
>>     URL: http://kernel.org/pub/scm/git/git.git
>>     Pull: master:origin maint:maint +pu:pu
>>
>
> A warning when you do this. If you say 
>
>   git pull origin
>
> then your master will be updated with an octopus merge of the three heads.

Ahhhhhhhh. That is true. I always do "git fetch" and never do "git pull" against anything but a local repository, heads explicitly specified. You are right. The defaulting behaviour is incredibly broken.

Do people agree it is a good idea to change the "git pull origin" to mean "fetch all the default refs specified on Pull: lines, and merge only the first one into the current branch"?

"git pull" without remote nor refspecs is a synonym to "git pull origin" as before, and 99.99% of the time "git pull" from a remote repo without explicit refspec is doing just one head merge, so I think this is a sane default, much saner than the current mess, while still allowing you to keep track of what's happening in the other branches by doing fetches of all the heads at once.

Opinions?
Previous: Tom PrinceNext: Petr Baudis
Message 9 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.