aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-04 22:30:44 -0700
committerJunio C Hamano <gitster@pobox.com>2008-09-04 22:30:44 -0700
commit80d12c23de4fbddfaee2f9bf7fe809f57d02e171 (patch)
tree572105c1fe83cbe98645ea37ca7b6f6b7163e1ad /diff.c
parent1b23adadf3adcf0074f61a498479a471964ab8c3 (diff)
parenta4d7d2c6dbc9e1294034171c31d87b24cf3b492e (diff)
downloadgit-80d12c23de4fbddfaee2f9bf7fe809f57d02e171.tar.gz
git-80d12c23de4fbddfaee2f9bf7fe809f57d02e171.tar.xz
Merge branch 'jc/maint-log-grep'
* jc/maint-log-grep: log --author/--committer: really match only with name part diff --cumulative is a sub-option of --dirstat bash completion: Hide more plumbing commands
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 135dec459..cbd151bbc 100644
--- a/diff.c
+++ b/diff.c
@@ -1078,7 +1078,7 @@ static void show_dirstat(struct diff_options *options)
dir.alloc = 0;
dir.nr = 0;
dir.percent = options->dirstat_percent;
- dir.cumulative = options->output_format & DIFF_FORMAT_CUMULATIVE;
+ dir.cumulative = DIFF_OPT_TST(options, DIRSTAT_CUMULATIVE);
changed = 0;
for (i = 0; i < q->nr; i++) {
@@ -2300,6 +2300,7 @@ void diff_setup(struct diff_options *options)
options->break_opt = -1;
options->rename_limit = -1;
options->dirstat_percent = 3;
+ DIFF_OPT_CLR(options, DIRSTAT_CUMULATIVE);
options->context = 3;
options->change = diff_change;
@@ -2472,8 +2473,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->output_format |= DIFF_FORMAT_SHORTSTAT;
else if (opt_arg(arg, 'X', "dirstat", &options->dirstat_percent))
options->output_format |= DIFF_FORMAT_DIRSTAT;
- else if (!strcmp(arg, "--cumulative"))
- options->output_format |= DIFF_FORMAT_CUMULATIVE;
+ else if (!strcmp(arg, "--cumulative")) {
+ options->output_format |= DIFF_FORMAT_DIRSTAT;
+ DIFF_OPT_SET(options, DIRSTAT_CUMULATIVE);
+ }
else if (!strcmp(arg, "--check"))
options->output_format |= DIFF_FORMAT_CHECKDIFF;
else if (!strcmp(arg, "--summary"))