git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multi-ancestor read-tree notes
@ 2005-09-05  5:41 Daniel Barkalow
  2005-09-06  5:42 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Daniel Barkalow @ 2005-09-05  5:41 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

I've got a version of read-tree which accepts multiple ancestors and does 
a merge using information from all of them.

The basic features are that it looks for an ancestor which would permit a 
trivial merge, and uses that. However, if it finds ancestors which permit 
different trivial merges, it does not merge (which I call case #16).

In case #16, I'm not sure what I should produce. I think the best thing 
might be to not leave anything in stage 1. The desired end effect is that 
the user is given a file with a section like:

  {
    *t = NULL;
    *m = 0;
<<<<<<<<
    return Z_DATA_ERROR;
========
    return Z_OK;
>>>>>>>>
  }

In other news, the merge that was giving Len Brown problems a while ago 
turns out to have the above conflict, and he happened to end up doing the 
right thing and not reverting Linus's revert of an unnecessary (but 
harmless) change. I only noticed this just now, when I was testing that 
merge, and got it to generate only two conflicts regardless of order of 
ancestors (didn't try to resolve the other one, drivers/acpi/osl.c, with 
"merge" either way).

So this test is encouraging: I get fewer non-trivial cases than either of 
the ancestors alone gives, and I catch a case that both single ancestors 
gets wrong.

Note that there are still some memory leaks for me to fix, but that's the 
only flaw I know of with this.

Patches against mainline to follow shortly.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-09-11 16:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-05  5:41 Multi-ancestor read-tree notes Daniel Barkalow
2005-09-06  5:42 ` Junio C Hamano
2005-09-06 17:43   ` Daniel Barkalow
2005-09-06 20:03     ` Junio C Hamano
2005-09-06 20:25       ` Daniel Barkalow
2005-09-06 21:53         ` Junio C Hamano
2005-09-06 22:59           ` Daniel Barkalow
2005-09-10 22:50     ` Junio C Hamano
2005-09-10 22:56       ` Junio C Hamano
2005-09-08 17:16 ` Darrin Thompson
2005-09-08 20:37   ` Fredrik Kuivinen
2005-09-08 21:39   ` Daniel Barkalow
2005-09-08 21:54     ` Darrin Thompson
2005-09-08 22:00     ` Junio C Hamano
2005-09-08 22:10       ` Daniel Barkalow
2005-09-09 17:29 ` Junio C Hamano
2005-09-09 20:44   ` Daniel Barkalow
2005-09-11 16:45     ` Matthias Urlichs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).