1

As the opening title suggests, I am trying to produce a side-by-side diff using git difftool. I am in an environment s.t. vimdiff is the only available tool on these computers and am using CLI commands to do code reviews.

If I have the head/origin (that may be desynced/unable to do git apply), how would I create a side-by-side diff when I have a patch file (produced via git diff patch-a patch-b > patch-file.patch)?

Obviously, the ideal scenario would be git apply myPatch.patch, git difftool -y origin-hash patch-hash, but this does not always work.

  • just let me point out that patch files are not exclusive for git - they are just the output of diff, which is used in VCS much older than git, such as svn, cvs, rcs, sccs, etc – carnicer Feb 16 '21 at 01:05

1 Answers1

1

I was thinking of developing a tool that just makes this.

I found out there is at least already one that makes it. Beware it is not free software, but perhaps you may be able to use it.

It is called beyond compare. I use it on windows.

If you have a patch file, in the context menu you shall use open with, then select beyond compare (assuming you have installed it and you have no licensing issues).

carnicer
  • 494
  • 3
  • 9