diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-09-29 09:04:15 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-09-29 09:04:15 -0700 |
| commit | 5cd3f68add3cf24c322f925a5ca05a278bc6c027 (patch) | |
| tree | 2aeb289c520081aa9e8873808990f366fa468a5e /revision.c | |
| parent | Merge branch 'ds/stat-name-width-configuration' (diff) | |
| parent | range-diff: treat notes like `log` (diff) | |
| download | git-5cd3f68add3cf24c322f925a5ca05a278bc6c027.tar.gz git-5cd3f68add3cf24c322f925a5ca05a278bc6c027.zip | |
Merge branch 'kh/range-diff-notes'
"git range-diff --notes=foo" compared "log --notes=foo --notes" of
the two ranges, instead of using just the specified notes tree.
* kh/range-diff-notes:
range-diff: treat notes like `log`
Diffstat (limited to 'revision.c')
| -rw-r--r-- | revision.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 2f4c53ea20..49d385257a 100644 --- a/revision.c +++ b/revision.c @@ -2484,6 +2484,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->break_bar = xstrdup(optarg); revs->track_linear = 1; revs->track_first_time = 1; + } else if (!strcmp(arg, "--show-notes-by-default")) { + revs->show_notes_by_default = 1; } else if (skip_prefix(arg, "--show-notes=", &optarg) || skip_prefix(arg, "--notes=", &optarg)) { if (starts_with(arg, "--show-notes=") && @@ -3054,6 +3056,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s if (revs->expand_tabs_in_log < 0) revs->expand_tabs_in_log = revs->expand_tabs_in_log_default; + if (!revs->show_notes_given && revs->show_notes_by_default) { + enable_default_display_notes(&revs->notes_opt, &revs->show_notes); + revs->show_notes_given = 1; + } + return left; } |
