X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff-tree.c;h=0b591c87169ff4b8c2173bedb26d6ed1a8a84b68;hb=b92565dc5c505c3d01f3219fb7f61ebc70630a2c;hp=24cb2d7f84064d7833fa04f33aeca6eafc8b931d;hpb=5bac4a671907604b5fb4e24ff682d5b0e8431931;p=git.git diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c index 24cb2d7f8..0b591c871 100644 --- a/builtin-diff-tree.c +++ b/builtin-diff-tree.c @@ -118,7 +118,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) } if (!read_stdin) - return 0; + return opt->diffopt.exit_with_status ? + opt->diffopt.has_changes: 0; if (opt->diffopt.detect_rename) opt->diffopt.setup |= (DIFF_SETUP_USE_SIZE_CACHE | @@ -133,5 +134,5 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) else diff_tree_stdin(line); } - return 0; + return opt->diffopt.exit_with_status ? opt->diffopt.has_changes: 0; }