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

not possible to compare files #74

Closed
mikekgr opened this issue Feb 15, 2024 · 8 comments · Fixed by #75
Closed

not possible to compare files #74

mikekgr opened this issue Feb 15, 2024 · 8 comments · Fixed by #75
Milestone

Comments

@mikekgr
Copy link

mikekgr commented Feb 15, 2024

installed version 4.8.30 - build 229 at Windows 11
Dear Sirs, as the title says, in my installation / case, it is not possible to compare files, I always got the error : "Two files are needed to compare" although I have the two files
Is this functionality need any special handling? Do I need special handling ?
Just to mention that I usually work on mc on my Ubuntu 20.04 server and this function "compare files" is working as it should.

Thanks and Best Regards,
Mike Kranidis

@adamyg
Copy link
Owner

adamyg commented Feb 16, 2024

mcwin32 currently assumes a Unix style diff (GNU only) is within the path; with explicit use of "Line Group Formats' options. Shall consider options.

@mikekgr
Copy link
Author

mikekgr commented Feb 16, 2024

mcwin32 currently assumes a Unix style diff (GNU only) is within the path; with explicit use of "Line Group Formats' options. Shall consider options.

So, if understood correctly, shall I have to install a diff version suitable for win32?? Can you suggest me a good one?

@adamyg
Copy link
Owner

adamyg commented Feb 18, 2024

GNU diffutils; reviewing options of alt diff engine, maybe bsd-diff.

@mikekgr
Copy link
Author

mikekgr commented Feb 18, 2024

GNU diffutils; reviewing options of alt diff engine, maybe bsd-diff.

Well following your suggestion, I installed GNU diff in my Windows installation and I put the path to diff.exe in the Windows environment path. Now when I type diff --help in any cmd I got the proper response. Even at the mcwin32 prompt if I type diff --help I got response.
But mcwin32 does not work, give me the same error: "Two files are needed to compare" although I have specify the two files
What else I need to setup?
Thanks

@adamyg
Copy link
Owner

adamyg commented Feb 18, 2024

GNU diffutils; reviewing options of alt diff engine, maybe bsd-diff.

"Two files are needed to compare" is a generic error on failure.
Current internal diff command line is not suitable for popen() shell, reviewing

 diff -a --old-group-format='%df%(f=l?:,%dl)d%dE\n'  --new-group-format='%dea%dF%(F=L?:,%dL)\n' \
  --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)\n'  --unchanged-group-format='' filea fileb

@mikekgr
Copy link
Author

mikekgr commented Feb 18, 2024

GNU diffutils; reviewing options of alt diff engine, maybe bsd-diff.

"Two files are needed to compare" is a generic error on failure. Current internal diff command line is not suitable for popen() shell, reviewing

 diff -a --old-group-format='%df%(f=l?:,%dl)d%dE\n'  --new-group-format='%dea%dF%(F=L?:,%dL)\n' \
  --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)\n'  --unchanged-group-format='' filea fileb

Dear Sir,
Sorry but my knowledge is not that much in this subject. If you want to try something give me specific information. By the way I tried to found bsd-diff for Windows but I found nothing.

@adamyg adamyg added this to the build-230 milestone Feb 27, 2024
@adamyg
Copy link
Owner

adamyg commented Mar 5, 2024

bundling mcdiff, bsd diff derived diff engine with package.

@adamyg adamyg mentioned this issue Mar 30, 2024
@adamyg adamyg linked a pull request Mar 30, 2024 that will close this issue
@adamyg adamyg changed the title no possible to compare files not possible to compare files Mar 31, 2024
adamyg added a commit that referenced this issue Mar 31, 2024
build-230:
* mc merge 4.8.31 (#70)
* mbedtls 3.5.2 (#67)
* AltGr detection (#71, #52)
* mcdiff integration (#74)
* cd/cdpath (#72)
@mikekgr
Copy link
Author

mikekgr commented Apr 2, 2024

Dear @adamyg Many thanks for include diff and thus you make our life easier!

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 a pull request may close this issue.

2 participants