diff options
| author | Kristoffer Haugsbakk <code@khaugsbakk.name> | 2025-09-25 19:07:36 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-25 11:34:12 -0700 |
| commit | 155986b49b52b9b5910edc0fd56ba46f0f1bed22 (patch) | |
| tree | a494910b01921cfebd38481684c984c21057b1f0 /log-tree.c | |
| parent | revision: add rdiff_log_arg to rev_info (diff) | |
| download | git-155986b49b52b9b5910edc0fd56ba46f0f1bed22.tar.gz git-155986b49b52b9b5910edc0fd56ba46f0f1bed22.zip | |
format-patch: handle range-diff on notes correctly for single patches
(The two next paragraphs are taken from the previous commit.)
git-format-patch(1) supports Git notes by showing them beneath the
patch/commit message, similar to git-log(1). The command also supports
showing those same notes ref names in the range diff output.
Note *the same* ref names; any Git notes options or configuration
variables need to be handed off to the range-diff machinery. This works
correctly in the case when the range diff is on the cover letter. But it
does not work correctly when the output is a single patch with an
embedded range diff.
Concretely, git-format-patch(1) needs to pass `--[no-]notes` options on
to the range-diff subprocess in `range-diff.c`. Range diffs for single-
commit series are handled in `log-tree.c`. But `log-tree.c` had no
access to any `log_arg` variable before we added it to `rev_info` in the
previous commit.
Use that new struct member to fix this inconsistency.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
| -rw-r--r-- | log-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c index 73d21f7176..3d38c748e4 100644 --- a/log-tree.c +++ b/log-tree.c @@ -718,7 +718,8 @@ static void show_diff_of_diff(struct rev_info *opt) .creation_factor = opt->creation_factor, .dual_color = 1, .max_memory = RANGE_DIFF_MAX_MEMORY_DEFAULT, - .diffopt = &opts + .diffopt = &opts, + .log_arg = &opt->rdiff_log_arg }; memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff)); |
