
Diffoscope: in-depth comparison of files, archives, and directories - chei0aiV
http://diffoscope.org/
======
jakeogh
$ git clone
[https://anonscm.debian.org/git/reproducible/diffoscope.git](https://anonscm.debian.org/git/reproducible/diffoscope.git)
Cloning into 'diffoscope'... fatal: repository
'[https://anonscm.debian.org/git/reproducible/diffoscope.git/'](https://anonscm.debian.org/git/reproducible/diffoscope.git/')
not found

~~~
chei0aiV
The link was indeed posted a bit early. It is currently still named
"debbindiff", but will be renamed soon. At the moment it can still be found
here: [https://alioth.debian.org/plugins/scmgit/cgi-
bin/gitweb.cgi?...](https://alioth.debian.org/plugins/scmgit/cgi-
bin/gitweb.cgi?p=reproducible/debbindiff.git;a=summary)

------
davvid
It looks like this may be a premature announcement because the installation
instructions don't work, specifically the debian notes.

If someone is listening, I would suggest adding a SYNOPSIS section to the
documentation with the command-line usage. e.g., does it support 3-way
base/local/remote diffs?

`git difftool` knows about a lot of these kinda tools.. if this one looks
promising (it's free, so that's already a plus) then we can teach difftool
about it. I guess I'll wait and see if it materializes.

Adding support to git is pretty simple: create `mergetools/diffoscope` with
this (I'm guessing the cli syntax, but you get the idea):

    
    
        diff_cmd () {
            "$merge_tool_path" "$LOCAL" "$REMOTE"
        }
    
        merge_cmd () {
            if $base_present
            then
                "$merge_tool_path" --output "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
            else
                "$merge_tool_path" --output "$MERGED" "$LOCAL" "$REMOTE"
            fi
        }
    

In an existing git installation, that scriptlet can be copied to `$(git
--exec-path)/mergetools/diffoscope`. It can then be used as `git difftool -t
diffoscope`.

------
etwigg
Looks great! Shameless plug: DiffPlug can also diff arbitrarily nested
zip/tar/gz, runs on Win/Mac/Linux, and supports text/image/other stuff too.
It's closed-source and GUI, but you can control it from the command line, and
we're working on an Apache 2.0 API for building the differ plugins.

Open API for differs (totally incomplete, but we've already released some its
pre-reqs):
[https://github.com/diffplug/opendiff](https://github.com/diffplug/opendiff)

Archives and filesystems that we support:
[https://docs.diffplug.com/1.6.1/Filesystems/](https://docs.diffplug.com/1.6.1/Filesystems/)

------
amelius
Why not build a tool for every file format that simply dumps the contents of
the file in a human-readable way. Then feed the output through "diff". That
approach would sound more "unix-ey" to me.

~~~
etwigg
Great idea! That would work well for a lot of stuff, but I don't think it
would scale to diffing, say, two 4Gb iso files. Also, some structured content
has user-hidden IDs which can help a differ, but they probably wouldn't show
up in a "human-readable" representation.

~~~
amelius
The human-readable representation can be as long as you want. Also, one could
embed checksums in the output, so that if non-displayed contents differs that
would trigger an output by the diff command (granted, this way it is not so
human-readable anymore because of the checksum, but it would still be a more
modular approach).

~~~
etwigg
I don't think diff will perform well on two 4gb inputs. I agree there should
be a modular approach, but I don't think flat text is the best lowest-common-
denominator. Your proposal would certainly work for a lot of cases though, and
it is very unix-y!

------
girfan
Is this built on top of the standard Unix "diff" program?

------
jakeogh
Cool! Reminds me of kdiff3 but can do terminal output. Nice.

------
fit2rule
Repo seems to be down or invalid - anyone know where I can find the sources?
I'd love to attempt to port this to OSX ..

------
jmickey
How does this differ from Meld or WinDiff?

------
chei0aiV
diffoscope is now available in Debian sid.

