From: Dimitry Andric Date: Sun, 13 Dec 2015 10:35:07 +0000 (-0800) Subject: Simplify diff exit code handling. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7d25fcdbdb51f28a1e6465edd819aa5d99bc0f71;p=arcanist.git Simplify diff exit code handling. Summary: This fixes T9970 in an alternate manner, with the same effect: the binary_safe_diff.sh script returns 0 if the diff succeeds, 1 in all other cases. Test Plan: Tested locally with a fixed binary_safe_diff.sh, resulting in this correct review: https://reviews.freebsd.org/D4542 Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: eadler, Korvin, stevenh Maniphest Tasks: T9970 Differential Revision: https://secure.phabricator.com/D14759 --- diff --git a/scripts/repository/binary_safe_diff.sh b/scripts/repository/binary_safe_diff.sh index b51d31a6..00b02680 100755 --- a/scripts/repository/binary_safe_diff.sh +++ b/scripts/repository/binary_safe_diff.sh @@ -1,8 +1,3 @@ #!/bin/sh -diff "$@" -RES="$?" -if [ "$RES" = "2" ]; then - exit 1 -fi -exit "$RES" +diff "$@" || exit 1