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

Re: Null deref in recursive merge in df73af5f667a479764d2b2195cb0cb60b0b89e3d

From
Fredrik Kuivinen <frekui@gmail.com>
Date
Aug 18, 2009, 21:35 UTC
Message-ID
<4c8ef70908181435o1f9c6d0dncd84eb57b070b105@mail.gmail.com>
In-Reply-To
<7viqhaipg0.fsf@alter.siamese.dyndns.org>
On Thu, Jul 30, 2009 at 9:45 AM, Junio C Hamano<gitster@pobox.com> wrote:
Show 14 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> The codepath saw that one branch renamed dev-ubuntu/ stuff to dev/ at that
>> "unmerged" path, while the other branch added something else to the same
>> path, and decided to add that at an alternative path, and the intent of
>> that is so that it can safely resolve the "renamed" side to its final
>> destination.  The added update_file() call is about finishing that
>> conflict resolution the code forgets to do.
>
> By the way, (I am CC'ing Fredrik, the author of the merge-recursive.py,
> the original implementation, even though I haven't seen him around here
> for a long time. Two "thieves" are also CC'ed), I think the way recursive
> strategy tries to handle rename/add and rename/rename conflicts by coming
> up with a temporary pathname is fundamentally wrong.

It was a long time ago I looked at the merge stuff (or any git code in fact) so I may have forgotten some things. However, as far as I can see your analysis is correct and the temporary pathname stuff can be avoided when the conflicts only involve files (and no directories). As you wrote, for D/F conflicts one need the temporary pathnames in order to build a tree which is used in the virtual ancestor.

[Nice analysis of when temporary pathnames are needed and when they are not needed snipped.]

- Fredrik
PS. I am sorry for the late reply.
Previous: Johannes Schindelin
Message 11 of 11 in “Fw: Null deref in recursive merge in df73af5f667a479764d2b2195cb0cb60b0b89e3d”
  1. Josh ben JoreJul 28, 2009
  2. Josh ben JoreJul 29, 2009
  3. Junio C HamanoJul 30, 2009
  4. Josh ben JoreJul 30, 2009
  5. Junio C HamanoJul 30, 2009
  6. merge-recursive: don't segfault while handling rename clashesJunio C Hamano, Jul 31, 2009
  7. Clemens BuchacherJul 29, 2009
  8. Josh ben JoreJul 29, 2009
  9. Junio C HamanoJul 30, 2009
  10. Johannes SchindelinJul 30, 2009
  11. Fredrik KuivinenAug 18, 2009

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.