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

Re: What's in git.git (stable)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 22, 2006, 18:09 UTC
Message-ID
<Pine.LNX.4.63.0612221902490.19693@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<86fyb7sv9f.fsf@blue.stonehenge.com>
Hi,
On Fri, 22 Dec 2006, Randal L. Schwartz wrote:
Show 7 quoted lines
> >>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
> 
> >>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
> Junio> git-pull: refuse default merge without branch.*.merge
> 
> Randal> Argh.  How do I get back the old behavior?
> Randal> "git-pull origin" doesn't seem to be enough.
Maybe "git-pull origin master"?
> Randal> You just broke a bunch of automated scripts for me.
> 
> Ahh, it's "git-pull . origin".
This is just a merge, not a real pull (it leaves out the fetch part).
> Maybe a bit more warning for non-upward-compatible changes though, 
> please.

It is unfortunate that this change broke your scripts. But I really think that the new behaviour is much saner: If you have different branches, you probably do not want to pull the _same_ remote branch into _all_ of them.

So, for each branch (e.g. "xyz") for which you have a preferred upstream (e.g. remote "linus" with branch "master"), say

	$ git repo-config branch.xyz.remote linus
	$ git repo-config branch.xyz.merge refs/heads/master
Then,
	$ git pull

pulls your preferred upstream. But when you pull from another remote, or into another branch, without specifying which remote branch you want to pull, git now refuses to blindly pull branch "master". This should prevent quite some pilot errors.

Ciao, Dscho

Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 4 of 20 in “What's in git.git (stable)”
  1. Junio C HamanoDec 22, 2006
  2. Randal L. SchwartzDec 22, 2006
  3. Randal L. SchwartzDec 22, 2006
  4. Johannes SchindelinDec 22, 2006
  5. Randal L. SchwartzDec 22, 2006
  6. Randal L. SchwartzDec 22, 2006
  7. Johannes SchindelinDec 22, 2006
  8. Junio C HamanoDec 22, 2006
  9. Johannes SchindelinDec 22, 2006
  10. Junio C HamanoDec 22, 2006
  11. Luben TuikovDec 26, 2006
  12. Junio C HamanoDec 26, 2006
  13. Luben TuikovDec 27, 2006
  14. Junio C HamanoDec 27, 2006
  15. Junio C HamanoDec 22, 2006
  16. Jakub NarebskiDec 22, 2006
  17. Junio C HamanoDec 22, 2006
  18. Jakub NarebskiDec 22, 2006
  19. Junio C HamanoDec 22, 2006
  20. Quy TonthatDec 22, 2006

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.