Treat files using the binary merge driver as binary files when resolving conflicts#19271
Merged
niik merged 3 commits intodevelopmentfrom Oct 8, 2024
Merged
Treat files using the binary merge driver as binary files when resolving conflicts#19271niik merged 3 commits intodevelopmentfrom
niik merged 3 commits intodevelopmentfrom
Conversation
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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 --numstatand 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
.gitattributestobinary.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
After
Release notes
Notes: [Fixed] Files configured to use the binary merge driver are now treated as binary files when resolving conflicts.