Skip to content

Don't show file in both "winning" and "losing"#18

Open
oBusk wants to merge 1 commit into
rfuzzo:mainfrom
oBusk:fix-winning-and-losing
Open

Don't show file in both "winning" and "losing"#18
oBusk wants to merge 1 commit into
rfuzzo:mainfrom
oBusk:fix-winning-and-losing

Conversation

@oBusk
Copy link
Copy Markdown

@oBusk oBusk commented Feb 20, 2026

image

This happens when 3 archives (or more) edits the same file. The "middle" archive would both win over an lower prio, and lose against a higher prio.

This could be confusing, and especially when an archive has all their files "beaten" by another, as they would not be marked as obsolete.

This PR changes the behaviour to only show "winning" if no other archive wins that file. Each file is only in a single "winning" list.

image

I undestand the original behaviour is maybe intended, but I think highlighting only files that are actually "winning" would be clearer to users.

When three or more archives contain the same file, the middle archive
could end up with that file in both its `wins` and `loses` lists. This
happened because the reverse-iteration conflict scan would first mark
the middle archive as winning (when compared to the earlier archive),
then a later iteration would mark it as losing (when superseded by the
last archive) without clearing the stale `wins` entry.

Now when an archive is marked as losing a file, any previous winning
entry for that file is removed, so each file hash only appears in one
of the two lists.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 3b66bef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant