]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-diff-tree.c
git-help: add -w|--web option to display html man page in a browser.
[thirdparty/git.git] / builtin-diff-tree.c
index 0b591c87169ff4b8c2173bedb26d6ed1a8a84b68..2e13716eec985e7274d6f44646c94d8224964b7c 100644 (file)
@@ -118,8 +118,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
        }
 
        if (!read_stdin)
-               return opt->diffopt.exit_with_status ?
-                   opt->diffopt.has_changes: 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 |
@@ -134,5 +134,6 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
                else
                        diff_tree_stdin(line);
        }
-       return opt->diffopt.exit_with_status ? opt->diffopt.has_changes: 0;
+       return DIFF_OPT_TST(&opt->diffopt, EXIT_WITH_STATUS)
+               && DIFF_OPT_TST(&opt->diffopt, HAS_CHANGES);
 }