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

Re: Expected Behavior?

From
Petr Baudis <pasky@suse.cz>
Date
Nov 9, 2005, 11:24 UTC
Message-ID
<20051109112452.GD30496@pasky.or.cz>
In-Reply-To
<20051108210332.GB23265@c165.ib.student.liu.se>

Dear diary, on Tue, Nov 08, 2005 at 10:03:32PM CET, I got a letter where Fredrik Kuivinen <freku045@student.liu.se> said that...

Show 34 quoted lines
> On Mon, Nov 07, 2005 at 10:00:11PM -0800, Junio C Hamano wrote:
> > Jon Loeliger <jdl@freescale.com> writes:
> > 
> > > That is, after the merge, file3 appears to have simply kept
> > > the contents of the current, master branch.  Why wasn't the
> > > dev branch represented here?
> > >
> > > I _almost_ think I get it, and then *poof*...
> > 
> > Automerge completely punted for this path, and at this point, it
> > is still unmerged:
> > 
> > ------------
> > $ git ls-files --unmerged
> > 100644 c4da0eb.... 2       file3
> > 100644 fbc2aa4.... 3       file3
> > ------------
> > 
> > Three-way "git-read-tree -m -u O A B" (O is for old, A is ours
> > and B is hers) puts O in stage1, A in stage2 and B in stage3.
> > This path did not exist in O so we only have them in stage2 and
> > stage3.  You could compare the stages like this:
> > 
> 
> Jon: You could try to this merge with the recursive merge strategy
> (git merge -s recursive 'merge message' master dev) If you do, you
> _should_ get something like:
> 
>     CONFLICT (add/add): File file3 added non-identically in both
>     branches. Adding as file3_master and file3_dev instead.
> 
> You will then end up with file3_master and file3_dev in your working
> tree, which corresponds to file3 in the master branch and file3 in the
> dev branch, respectively.

The world would be so much better if there would be just a _single_ per-file automerger instead of three right now...

I'm planning to feed back the automerger stuff from Cogito to GIT like I already did once, but it's not a priority right now so it may take some time (unless someone else does it, which is something I certainly wouldn't oppose).

But in the longer term even the recursive merge should use the same one, so either we should enhance the shell one to handle all the cases, or split out the python per-file automerger from recursive merge and make it possible to use this one separately. This is probably more viable option in the longer term, even though I personally don't grok python very well - whatever, at least I'll have to get better. ;-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Petr BaudisNext: Martin Langhoff
Message 17 of 28 in “Re: Expected Behavior?”
  1. Jon LoeligerNov 8, 2005
  2. Junio C HamanoNov 8, 2005
  3. Petr BaudisNov 8, 2005
  4. merge-one-file: use common as base, instead of emptiness.Junio C Hamano, Nov 10, 2005
  5. Petr BaudisNov 10, 2005
  6. Junio C HamanoNov 10, 2005
  7. Petr BaudisNov 10, 2005
  8. Fredrik KuivinenNov 8, 2005
  9. Junio C HamanoNov 8, 2005
  10. Fredrik KuivinenNov 8, 2005
  11. Junio C HamanoNov 9, 2005
  12. Fredrik KuivinenNov 9, 2005
  13. merge-recursive: Fix support for branch names containing slashesFredrik Kuivinen, Nov 9, 2005
  14. Petr BaudisNov 10, 2005
  15. Junio C HamanoNov 10, 2005
  16. Petr BaudisNov 10, 2005
  17. Petr BaudisNov 9, 2005
  18. Martin LanghoffNov 9, 2005
  19. Petr BaudisNov 9, 2005
  20. Martin LanghoffNov 9, 2005
  21. Petr BaudisNov 9, 2005
  22. Martin LanghoffNov 10, 2005
  23. Petr BaudisNov 10, 2005
  24. Martin LanghoffNov 10, 2005
  25. Petr BaudisNov 10, 2005
  26. Junio C HamanoNov 9, 2005
  27. Petr BaudisNov 9, 2005
  28. Junio C HamanoNov 10, 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.