Merge branch 'ew/svn-rev-db'
[gitweb.git] / builtin-diff-tree.c
index 24cb2d7f84064d7833fa04f33aeca6eafc8b931d..2e13716eec985e7274d6f44646c94d8224964b7c 100644 (file)
@@ -118,7 +118,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
        }
 
        if (!read_stdin)
-               return 0;
+               return DIFF_OPT_TST(&opt->diffopt, EXIT_WITH_STATUS)
+                       && DIFF_OPT_TST(&opt->diffopt, HAS_CHANGES);
 
        if (opt->diffopt.detect_rename)
                opt->diffopt.setup |= (DIFF_SETUP_USE_SIZE_CACHE |
@@ -133,5 +134,6 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
                else
                        diff_tree_stdin(line);
        }
-       return 0;
+       return DIFF_OPT_TST(&opt->diffopt, EXIT_WITH_STATUS)
+               && DIFF_OPT_TST(&opt->diffopt, HAS_CHANGES);
 }