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

GitParse error: Expected binary line to be in 'Binary files a/fileA and b/fileB differ' format. #2384

Closed
rgmz opened this issue Feb 5, 2024 · 2 comments · Fixed by #2391
Closed
Labels

Comments

@rgmz
Copy link
Contributor

rgmz commented Feb 5, 2024

Please review the Community Note before submitting

TruffleHog Version

3.67.1

Trace Output

2024-02-05T13:27:57-05:00       info-2  trufflehog      Expected binary line to be in 'Binary files a/fileA and b/fileB differ' format. {"got": "QmluYXJ5IGZpbGVzIC9kZXYvbnVsbCBhbmQgImIvYXNzZXRzL3JldGFpbGVycy9PTi1pa29ueS1QbGF0Zm9ybWEtZWNvbSBcMzQyXDIwMFwyMjQga29waWEucG5nIiBkaWZmZXIK"}
2024-02-05T13:27:57-05:00       info-2  trufflehog      Expected binary line to be in 'Binary files a/fileA and b/fileB differ' format. {"got": "QmluYXJ5IGZpbGVzIC9kZXYvbnVsbCBhbmQgImIvYXNzZXRzL3JldGFpbGVycy9PTi1pa29ueS1Qcm9zdGEtc2thbGEgXDM0MlwyMDBcMjI0IGtvcGlhLnBuZyIgZGlmZmVyCg=="}

Expected Behavior

The diff is parsed.

Actual Behavior

The diff is not parsed correctly, because file B is wrapped in quotes:

Binary files /dev/null and "b/assets/retailers/ON-ikony-Platforma-ecom \342\200\224 kopia.png" differ

Steps to Reproduce

N/A

Environment

N/A

Additional Context

That weird encoding, \342\200\224, is apparently an em dash.
https://apple.stackexchange.com/questions/413832/hyphen-is-being-replaced-by-342-200-224-in-bash

References

N/A

@rosecodym
Copy link
Collaborator

What are the circumstances that trigger this? Is it only when one of the file paths includes weird stuff like em dashes?

@rgmz
Copy link
Contributor Author

rgmz commented Feb 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants