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

Re: confusion over the new branch and merge config

From
Jeff King <peff@peff.net>
Date
Jan 2, 2007, 14:49 UTC
Message-ID
<20070102144940.GA23932@coredump.intra.peff.net>
In-Reply-To
<7vbqlvrldk.fsf@assigned-by-dhcp.cox.net>
On Sat, Dec 23, 2006 at 01:51:03AM -0800, Junio C Hamano wrote:
> If you (or other people) use branch.*.merge, with its value set
> to remote name _and_ local name, and actually verify that either
> form works without confusion, please report back and I'll apply.

This [using tracking branches in branch.*.merge] seems to be working for me, but it is possible to get some confusing results with it. Try this config:

[remote "origin"]
  url = /my/other/git/repo
  fetch = refs/heads/master:refs/heads/origin
  fetch = refs/heads/origin:refs/heads/junio
[branch "master"]
  remote = origin
  merge = refs/heads/origin

That is, we have a local tracking branch 'X' which has the same name as a remote branch 'X'. When we fetch, both will be marked for merge in FETCH_HEAD, and git-pull will attempt to do an octopus.

Is this too convoluted a config to worry about (no, I don't actually do this in my repository -- I just constructed the most plausible reason I could think of for having conflicting names). I actually think having a branch.*.mergelocal would make just as much sense and would be more robust (plus, it should be safe and sensible for "git-checkout -b foo bar" to point branch.foo.mergelocal to refs/heads/bar).

-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 33 of 45 in “confusion over the new branch and merge config”
  1. Nicolas PitreDec 21, 2006
  2. Junio C HamanoDec 21, 2006
  3. SeanDec 21, 2006
  4. Junio C HamanoDec 22, 2006
  5. Junio C HamanoDec 22, 2006
  6. SeanDec 22, 2006
  7. Andy ParkinsDec 22, 2006
  8. Alan ChandlerDec 22, 2006
  9. Junio C HamanoDec 22, 2006
  10. Andy ParkinsDec 22, 2006
  11. Alan ChandlerDec 22, 2006
  12. Nicolas PitreDec 22, 2006
  13. Jakub NarebskiDec 22, 2006
  14. Nicolas PitreDec 22, 2006
  15. Jakub NarebskiDec 22, 2006
  16. Junio C HamanoDec 22, 2006
  17. Tom PrinceDec 23, 2006
  18. Nicolas PitreDec 23, 2006
  19. Jeff KingDec 23, 2006
  20. Nicolas PitreDec 23, 2006
  21. Junio C HamanoDec 23, 2006
  22. Shawn PearceDec 23, 2006
  23. Jeff KingDec 23, 2006
  24. Junio C HamanoDec 23, 2006
  25. Jeff KingDec 23, 2006
  26. Junio C HamanoDec 23, 2006
  27. Jakub NarebskiDec 23, 2006
  28. Johannes SchindelinDec 23, 2006
  29. Jakub NarebskiDec 23, 2006
  30. Jeff KingDec 24, 2006
  31. Nicolas PitreDec 24, 2006
  32. Jeff KingDec 26, 2006
  33. Jeff KingJan 2, 2007
  34. Junio C HamanoJan 2, 2007
  35. Jeff KingJan 2, 2007
  36. Junio C HamanoJan 2, 2007
  37. Jakub NarebskiJan 2, 2007
  38. Santi BéjarJan 3, 2007
  39. Jakub NarebskiJan 3, 2007
  40. Jeff KingJan 9, 2007
  41. Jeff KingJan 9, 2007
  42. Jakub NarebskiDec 23, 2006
  43. Andy ParkinsDec 22, 2006
  44. Lars HjemliDec 22, 2006
  45. Nicolas PitreDec 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.