Skip to content

Conversation

@nornagon
Copy link
Contributor

example from the wild: https://chromium.googlesource.com/chromium/src/+/22b5144060f40e96f2e7faba8d5c15a288f6d0f7%5E%21/

diff --git a/chrome/android/java/res_autofill_assistant/drawable-hdpi/autofill_assistant_bottombar_bg.9.png b/chrome/android/features/autofill_assistant/java/res/drawable-hdpi/autofill_assistant_bottombar_bg.
9.png
similarity index 100%
rename from chrome/android/java/res_autofill_assistant/drawable-hdpi/autofill_assistant_bottombar_bg.9.png
rename to chrome/android/features/autofill_assistant/java/res/drawable-hdpi/autofill_assistant_bottombar_bg.9.png
Binary files differ

This is currently failing with a parse error.

@BinaryMuse BinaryMuse self-assigned this Mar 11, 2019
@BinaryMuse
Copy link
Collaborator

In #12, I wrote:

The binary field is usually true or false, but in this case, we don't actually know if the file is binary or not, so I opted to set this to null.

But perhaps I was mistaken, as shown in this diff. @kuychaco, do you think we should add the binary field for items processed by postProcessSimilarityDiff?

@BinaryMuse
Copy link
Collaborator

The diffs I generated for the tests in #12 includes e.g.

diff --git old/file.png new/file.png
similarity index 90%
rename from old/file.png
rename to new/file.png
diff --git copy/file.png copy/file2.png
similarity index 100%
copy from copy/file.png
copy to copy/file2.png

I need to double check if these are accurate Git output for copies/renames of binary files.

Copy link
Collaborator

@BinaryMuse BinaryMuse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, this looks good to me as a starting point.

@nornagon
Copy link
Contributor Author

I'm not sure how Gitiles is generating its output, but what I am parsing is https://chromium.googlesource.com/chromium/src/+/74.0.3724.8..74.0.3729.5?format=TEXT (which is a base64-encoded patch generated by gitiles)

@BinaryMuse BinaryMuse merged commit bb00886 into kuychaco:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants