Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-diff-tree.c')
-rw-r--r--builtin-diff-tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c
index 0b591c8716..2e13716eec 100644
--- a/builtin-diff-tree.c
+++ b/builtin-diff-tree.c
@@ -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);
}