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

Error parsing diff Expected "rename from ", but got "copy from si" #14

Open
dubcanada opened this issue Jan 17, 2013 · 1 comment
Open
Labels

Comments

@dubcanada
Copy link

Hey,

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.

@alexandresalome
Copy link
Member

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:

  1. Modify the Diff object to accept parameters for the strategy (detect renames, copies, white spaces and so on)
  2. Modify the DiffParser to tolerate all possible outputs.

@GrahamCampbell GrahamCampbell removed this from the v0.9 - pre-release milestone Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants