Partial commit now fails for only one of the files in my repo
See original GitHub issueDescription
I have a file in my repo where I’m trying to commit only select lines in it, but it’s failing with the message The requested changes conflict with one or more files in the repository.
One of the blocks was 2 lines of text that I replaced with a new single line. I couldn’t commit this at all, even trying to commit just the removed lines or the added line resulted in an error.
I can commit individual changes just fine with the native client and other edited files commit just fine as well. In the end I git stash -p
and stashed the few things I didn’t want in this commit and then was able to commit the entire file ok.
Version
GitHub Desktop version: 0.6.0 OS version: Win10 CU (10.0.15063)
Steps to Reproduce
I’m unable to reproduce this in any other files. It happened in just this one. I’m not sure if it’s relevant or not but I did restore these changes from a stash before continuing work on them. There were no conflicts in this file when I did that and other changes were committed just fine before getting to this file.
Expected behaviour: I should be able to select a changed block and commit it
Actual behaviour: I’m unable to commit any changes and receive the error The requested changes conflict with one or more files in the repository.
Reproduces how often: On one file only so far
Logs
2017-06-12T18:40:38.575Z - error: [ui] `git apply --cached --unidiff-zero --whitespace=nowarn -` exited with an unexpected code: 1.
error: patch failed: src/Web/Views/PurchaseSeller/Form.cshtml:71
error: src/Web/Views/PurchaseSeller/Form.cshtml: patch does not apply
(The error was parsed as 24: The requested changes conflict with one or more files in the repository.)
Additional Information
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
@xt0rted Thanks for sharing that repository with me!
It looks like this was related to the unicode diff bug fixed in https://github.com/desktop/desktop/pull/1970. Since the file contained a unicode character and we’d garble it, the patch couldn’t apply.
@kaster14 Sorry you are experiencing issues with partial commits.
Please submit a fresh issue here if you would like us to take a look. Thanks!