Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected diff result returned: '4' #10640

Closed
ariffjeff opened this issue Sep 24, 2020 · 3 comments · Fixed by #10865
Closed

Unexpected diff result returned: '4' #10640

ariffjeff opened this issue Sep 24, 2020 · 3 comments · Fixed by #10865
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature

Comments

@ariffjeff
Copy link

ariffjeff commented Sep 24, 2020

Describe the bug

Attempting to commit some line changes in a file where only some number of lines (out of the total amount of lines changed) are highlighted to be committed causes this error: Unexpected diff result returned: '4'.

I can commit all of the changes in the file at the same time by leaving every line highlighted by default, but leaving a single line un-highlighted leads to this error.

I can only reproduce this for a single file... and I've made enough changes in this file that I get the typical message of The diff is too large to be displayed by default... so perhaps this has something to do with it.

Version & OS

Windows 10
Desktop: Version 2.5.5

Steps to reproduce the behavior

Make a large amount of changes, 2 hundred lines or so in a file.
Try to commit only a line or so.
The error should appear.

Expected behavior

Commit only highlighted lines.

Logs

The only addition to the log that appears when I reproduce this error is this line: 2020-09-24T20:52:18.331Z - info: [ui] [Timing] Action 'create commit' for 'onelooksigns/illustrator_extendscripts' took 0.120s

@tierninho
Copy link
Contributor

@ariffjeff Thanks for the report. I tried to reproduce this but I could not.

Any chance this was a binary file? Was the commit part of a merge conflict?

@tierninho tierninho added the more-info-needed The submitter needs to provide more information about the issue label Sep 24, 2020
@ariffjeff
Copy link
Author

@tierninho
This is not a binary file, it is a plain old javascript file, well in this case an Extendscript file which is just ES3 javascript and the file extension of .jsx.

I don't believe it was part of a merge conflict. With my limited understanding of git all I was doing was committing line changes for this file in the master branch (the only branch in the repo) if that is what you mean. I am the only person working on this repo, although I have used two accounts by accident to commit to this repo in the past but this was before I even created this file recently. So I'm not entirely sure what would be causing this issue.

I was having some possibly related (i doubt it though) git shenanigans beforehand as well (on a completely different file): trying to rename files by only changing the first letter of each filename from uppercase to lowercase, committing this change, and then getting problems where git thought I had two files for a single file when I made changes in it. To be more specific I did the following...

  1. rename Abc.jsx to abc.jsx
  2. set ignore case sensitivity checking to false
  3. commited the file rename. (this appeared in Github Desktop as the creation of abc.jsx, AND NOT the deletion of Abc.jsx)
  4. made a line change in abc.jsx
  5. GitHub Desktop would show identical changes in two files: Abc.jsx and abc.jsx even though only abc.jsx exists in the directory.

Again, probably not related. But it's suspicious git behavior non the less at the same time I'm getting this other error.

@niik niik added bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature and removed more-info-needed The submitter needs to provide more information about the issue labels Oct 19, 2020
@niik
Copy link
Member

niik commented Oct 19, 2020

@ariffjeff Thanks for opening this. I was able to reproduce this and I've opened #10865 to hopefully fix this bug. With a little luck it'll make it into the next production release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@niik @tierninho @ariffjeff and others