Commit 85bd88a
revision: add rdiff_log_arg to rev_info
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`. This is handled in
`builtin/log.c` by the local variable `log_arg` in the case of mul-
tiple commits, but not in the single commit case where there is no
cover letter and the range diff is embedded in the patch output; the
range diff is then made in `log-tree.c`, whither `log_arg` has not
been propagated. This means that the range-diff subprocess reverts
to its default behavior, which is to act like git-log(1) w.r.t. notes.
We need to fix this. But first lay the groundwork by converting
`log_arg` to a struct member; next we can simply use that member
in `log-tree.c` without having to thread it from `builtin/log.c`.
No functional changes.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 71fd6c6 commit 85bd88a
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | | - | |
1404 | 1403 | | |
1405 | 1404 | | |
1406 | 1405 | | |
1407 | 1406 | | |
1408 | 1407 | | |
1409 | | - | |
| 1408 | + | |
1410 | 1409 | | |
1411 | 1410 | | |
1412 | 1411 | | |
1413 | 1412 | | |
1414 | 1413 | | |
1415 | 1414 | | |
1416 | 1415 | | |
1417 | | - | |
1418 | 1416 | | |
1419 | | - | |
1420 | 1417 | | |
1421 | 1418 | | |
1422 | 1419 | | |
| |||
2328 | 2325 | | |
2329 | 2326 | | |
2330 | 2327 | | |
| 2328 | + | |
2331 | 2329 | | |
2332 | 2330 | | |
2333 | 2331 | | |
| |||
2487 | 2485 | | |
2488 | 2486 | | |
2489 | 2487 | | |
| 2488 | + | |
2490 | 2489 | | |
2491 | 2490 | | |
2492 | 2491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| |||
0 commit comments