Re: [PATCH] merge-ort: fix bug with renormalization and rename/delete conflicts
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 30, 2021, 22:56 UTC
- Message-ID
- <xmqqa6ghog5x.fsf@gitster.g>
- In-Reply-To
- <78ba0d99-246b-d90c-b725-c084c8304f02@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 7 quoted lines
> This breakdown of the cases is informative, and I like how self-contained > the change is. > .... > > This patch looks good to me. Thanks! > > Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Thanks, both.
A related tangent, but I was looking at the data structure involved and noticed that the casting between structure types "merged_info" and "conflict_info" looked a bit ugly. It might be worth cleaning them up into
(A) a union with two struct, with "clean" member in the union to
switch between the two structures; or (B) a single structure that looks like "conflict_info" but inlines
members of "merged_info" into it.The latter may be cleaner and simpler, and the unified data type would be the "merge info", which may be representing cleanly merged path, or conflicted path, and would justify conditional use of some members based on the value of the .clean member.