You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error parsing diff Expected "rename from ", but got "copy from si" #14
While I was viewing one of my diffs for a commit I got a
Expected "rename from ", but got "copy from si"
This error occurred because I copied pretty much my entire file from one from to another (but did a few changes, so git diff returned...
similarity index 97%
copy from style.css
copy to common.css
Similarity index can also be copy, it's not restricted to just renaming.
I'll see if I can get a pull request done. But how do you generally handle multiple options? I can't seem to find any other example. For now I just wrapped it in a try catch.
By now, diff command is executed by default with some parameters to detect copies and renames. Those should be options in Diff constructor and passed to ->run(...) properly.
This problem needs to be addressed in two parts:
Modify the Diff object to accept parameters for the strategy (detect renames, copies, white spaces and so on)
Modify the DiffParser to tolerate all possible outputs.
Activity
alexandresalome commentedon Jan 17, 2013
By now,
diffcommand is executed by default with some parameters to detect copies and renames. Those should be options in Diff constructor and passed to->run(...)properly.This problem needs to be addressed in two parts:
Support "copy from"/"copy to" in diff parser (#244)