bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#16608: Bug#737180: diffutils: diff exit status is 2


From: Santiago Vila
Subject: [bug-diffutils] bug#16608: Bug#737180: diffutils: diff exit status is 2 instead of 1 on binary files that differ (fwd)
Date: Fri, 31 Jan 2014 11:08:20 +0100 (CET)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

Hello.

I received this report from the Debian bug system.
Thanks.

---------- Forwarded message ----------
From: Vincent Lefevre <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Fri, 31 Jan 2014 03:06:13 +0100
Subject: Bug#737180: diffutils: diff exit status is 2 instead of 1 on binary
    files that differ

Package: diffutils
Version: 1:3.3-1
Severity: normal

When diffing binary files that differ, e.g.

$ diff /usr/share/doc/diffutils/changelog.Debian.gz 
/usr/share/doc/diffutils/changelog.gz
Binary files /usr/share/doc/diffutils/changelog.Debian.gz and 
/usr/share/doc/diffutils/changelog.gz differ
zsh: exit 2     diff /usr/share/doc/diffutils/changelog.Debian.gz

I get exit status 2 instead of 1.

The diff(1) man page says:

  Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.

We are in the case where the inputs are different, so that the
exit status should be 1.

Because of this bug, "svn diff --force --diff-cmd diff" fails on
binary files (ditto on more useful cases in practice, where a diff
wrapper is used to recognize some binary files, using the default
diff behavior as a fallback).

[...]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]