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

🚀 How to force diff in text mode for binary file? #516

Open
robinmoussu opened this issue Feb 2, 2021 · 2 comments
Open

🚀 How to force diff in text mode for binary file? #516

robinmoussu opened this issue Feb 2, 2021 · 2 comments

Comments

@robinmoussu
Copy link

Hi, I guess that what I’d like to do already exists, but I wasn’t able to find the option in the documentation.

I have a file that is mostly text, except for a single \0 in the middle. I have another one which is text + ansi escape color code. If I run git diff --text with delta as the difftool, the diff is perfectly rendered. However, if I run git difftool -x delta --text, I got the following message:

Binary files old and new differ

I also get the same message if I try to run delta manually from the command line. How do I force delta to do the diff in text mode for binary file? Something like --text. I did not found anything useful by searching text and binary in the help, or in the Readme.

@tgross35
Copy link

diff has the -a/--text flag which just treats all files as text, it would be great to have this option in delta.

@th1000s
Copy link
Collaborator

th1000s commented Jul 21, 2024

As you can see, delta can show the input if it actually reaches it. In the other cases the difftools which pipe data into delta need the --text flag. For the standalone delta file1 file case, with #1697 you will be able to call it with -@=--text.

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

No branches or pull requests

3 participants