Skip to content

Conversation

niik
Copy link
Member

@niik niik commented Sep 17, 2024

Closes #9846

Description

When Desktop encounters a merge, rebase, or stash conflict it attempts to differentiate between files which are plain-text and therefore will contain conflict markers, and files which are binary which will not. Up until now the way we've done so is by running diff --numstat and checking which files it deems to be binary (using Git's own heuristics for when a file is binary or not).

For some files it's beneficial to treat them as binary even though Git doesn't necessarily see them as such and one way users can do that is by setting the merge attribute in .gitattributes to binary.

With this change we'll respect that specific attribute value and treat matching files as binary. Note that there may be other (custom) merge drivers where only picking one or the other version might be helpful but we can't know that ahead of time so we'll start out simple by just respecting the binary merge driver.

Screenshots

Before

image

After

image

Release notes

Notes: [Fixed] Files configured to use the binary merge driver are now treated as binary files when resolving conflicts.

Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Makes sense!

@niik niik merged commit 76240d8 into development Oct 8, 2024
8 checks passed
@niik niik deleted the daily-driver branch October 8, 2024 10:44
@ZeddBread
Copy link

Still having this issue with .uasset files.
They keep corrupting from automatic resolves.
If there was an option to either attempt automatic resolves or manually resolve before-hand, that would be great!

image

@RolandMakkelie
Copy link

Hello, is it possible this feature is broken in the last update of Github Desktop? We noticed today that XLSX files were being resolved automatically (with the text "No conflicts remaining"). But there was indeed a conflict between the two binary files. So I excepted the option to choose from which branch to use the file in the conflict.

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.

Add option to resolve merge conflicts for binary driver
4 participants