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

Re: [PATCH 2/5] Treat D/F conflict entry more carefully in unpack-trees.c::threeway_merge()

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Apr 7, 2007, 19:08 UTC
Message-ID
<Pine.LNX.4.64.0704071456470.27922@iabervon.org>
In-Reply-To
<7vabxkcknp.fsf@assigned-by-dhcp.cox.net>
On Sat, 7 Apr 2007, Junio C Hamano wrote:
Show 10 quoted lines
> This fixes three buglets in threeway_merge() regarding D/F
> conflict entries.
> 
> * After finishing with path D and handling path D/F, some stages
>   have D/F conflict entry which are obviously non-NULL.  For the
>   purpose of determining if the path D/F is missing in the
>   ancestor, they should not be taken into account.
> 
> * D/F conflict entry is a phony entry and does not record the
>   path being processed, so do not pick up the name from there.

This bit is unnecessary, because the first bit means we treat D/F conflict as missing in that conditional, and don't count it as an entry at all, let alone one with a useful name.

Show 6 quoted lines
> * D/F conflict entry is a marker to say "this stage does _not_
>   have the path", so do not send them to keep_entry().
> 
> There might be more glitches, but I am slowly digging this mess
> through, which unfortunately was made even more work since
> merge-recursive is a built-in now.

Looks good, although it might be wise to add an "exists" function that returns false for df_conflict_entry and for NULL, to make the tests clearer, and to get a comment to point out the meaning of df_conflict_entry. Also, I think df_conflict_entry can be static bss in unpack-trees and not accessed through o->df_conflict_entry, since it's always the same value (being now universally initialized to a static pointer to heap...).

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 4 in “Treat D/F conflict entry more carefully in unpack-trees.c::threeway_merge()”
  1. 2/5 Treat D/F conflict entry more carefully in unpack-trees.c::threeway_merge()Junio C Hamano, Apr 7, 2007
  2. Daniel BarkalowApr 7, 2007
  3. Junio C HamanoApr 8, 2007
  4. Daniel BarkalowApr 8, 2007

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.