diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-14 12:56:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-14 12:56:09 -0700 |
| commit | deb58e4fa37a30ce56904b3f51308f3aa81d30a0 (patch) | |
| tree | 1118748c41469388bb812a11af5799a7ff688f91 /builtin/log.c | |
| parent | Merge branch 'en/xdiff-cleanup' (diff) | |
| parent | format-patch: handle range-diff on notes correctly for single patches (diff) | |
| download | git-deb58e4fa37a30ce56904b3f51308f3aa81d30a0.tar.gz git-deb58e4fa37a30ce56904b3f51308f3aa81d30a0.zip | |
Merge branch 'kh/format-patch-range-diff-notes'
"git format-patch --range-diff=... --notes=..." did not drive the
underlying range-diff with correct --notes parameter, ending up
comparing with different set of notes from its main patch output
you would get from "git format-patch --notes=..." for a singleton
patch.
* kh/format-patch-range-diff-notes:
format-patch: handle range-diff on notes correctly for single patches
revision: add rdiff_log_arg to rev_info
range-diff: rename other_arg to log_arg
Diffstat (limited to 'builtin/log.c')
| -rw-r--r-- | builtin/log.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/log.c b/builtin/log.c index 8aa1777940..c8319b8af3 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1406,13 +1406,12 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file, * can be added later if deemed desirable. */ struct diff_options opts; - struct strvec other_arg = STRVEC_INIT; struct range_diff_options range_diff_opts = { .creation_factor = rev->creation_factor, .dual_color = 1, .max_memory = RANGE_DIFF_MAX_MEMORY_DEFAULT, .diffopt = &opts, - .other_arg = &other_arg + .log_arg = &rev->rdiff_log_arg }; repo_diff_setup(the_repository, &opts); @@ -1420,9 +1419,7 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file, opts.use_color = rev->diffopt.use_color; diff_setup_done(&opts); fprintf_ln(rev->diffopt.file, "%s", rev->rdiff_title); - get_notes_args(&other_arg, rev); show_range_diff(rev->rdiff1, rev->rdiff2, &range_diff_opts); - strvec_clear(&other_arg); } } @@ -2334,6 +2331,7 @@ int cmd_format_patch(int argc, rev.rdiff_title = diff_title(&rdiff_title, reroll_count, _("Range-diff:"), _("Range-diff against v%d:")); + get_notes_args(&(rev.rdiff_log_arg), &rev); } /* @@ -2493,6 +2491,7 @@ done: rev.diffopt.no_free = 0; release_revisions(&rev); format_config_release(&cfg); + strvec_clear(&rev.rdiff_log_arg); return 0; } |
