1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-09 16:32:39 +01:00
phorge-arcanist/scripts/repository/binary_safe_diff.sh
Dimitry Andric 97056a3b85 Preserve the exit code of the diff command in binary_safe_diff.sh
Summary:
Some versions of Subversion (1.9 in any case, maybe others) will
duplicate diff headers, if the diff command run through --diff-cmd
returns 0.

This lead to T9970, where the addition of a new file with properties
only shows the properties themselves in the review, not the content of
the new file.

Test Plan: This is a trivial change, is a test needed at all?

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: stevenh, Korvin, eadler

Differential Revision: https://secure.phabricator.com/D14755
2015-12-13 02:21:43 -08:00

8 lines
80 B
Bash
Executable file

#!/bin/sh
diff "$@"
RES="$?"
if [ "$RES" = "2" ]; then
exit 1
fi
exit "$RES"