This introduces a new command-line option: --exit-code. The diff programs will return 1 for differences, return 0 for equality, and something else for errors. Signed-off-by: Alex Riesen --- Still working on my e-mail problems. Sorry for duplications. As promised on irc. I'm somewhat confused about diff_tree: it used to unconditionally return 0, yet every caller of it saves and passes the value! Documentation/diff-options.txt | 5 ++++ builtin-diff-tree.c | 12 +++++---- builtin-diff.c | 5 ++- diff-lib.c | 12 +++++++-- diff.c | 2 + diff.h | 3 +- t/t4017-diff-retval.sh | 51 ++++++++++++++++++++++++++++++++++++++++ tree-diff.c | 11 +++++++- 8 files changed, 88 insertions(+), 13 deletions(-) create mode 100755 t/t4017-diff-retval.sh