Re: [PATCH 2/3] diff: fix filtering of additional headers under --remerge-diff

From
Junio C Hamano <hidden>
Date
2022-08-31 22:26:07
"Elijah Newren via GitGitGadget" [off-list ref] writes:
From: Elijah Newren <redacted>

Commit 95433eeed9 ("diff: add ability to insert additional headers for
paths", 2022-02-02) introduced the possibility of additional headers.
Because there could be conflicts with no content differences (e.g. a
modify/delete conflict resolved in favor of taking the modified file
as-is), that commit also modified the diff_queue_is_empty() and
diff_flush_patch() logic to ensure these headers were included even if
there was no associated content diff.
In the longer term, I think we may have to redo the way additional
headers are inserted to the diff_queue.  All the diff code I am
familiar with (read: written before this hack was introduced) trusts
that diff_queue.nr is the number of paths that are returned by the
diff frontend, and unless there is diffcore_break involved, there
will be at most one diff_filepair that is about a path.

Why do these need to be separate entries in the queue, not a new
attribute added to an existing filepair?  Are we inserting pieces of
information that are not about any paths that are involved in the
diff?
Thread (2 messages) 2 messages, 2 authors, last reply 2022-09-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help