Subject: [PATCH 0/2] format-patch: handle range-diff on notes correctly for single patches

From: [email-masked]
Date: Mon, 22 Sep 2025 23:10:21 +0200

From: Kristoffer Haugsbakk <[email-masked]>

git-format-patch(1) does not handle Git notes correctly in the
range-diff output for single-commit series.  It reverts to the
default behavior of git-range-diff(1), which is to act like git-log(1).

Fix that notes handling to always output the same notes (namespaces) in
the two positions:

• beneath the commit message; and
• in the range-diff.

Do that by (patch by patch):

1. Refactoring to use a new `ref_info` struct member
2. Using that in `log-tree.c`

§ Testing

I have (for once) tried to check for leaks by running the test suite
with this `config.mak`:

```
DEVELOPER=1
DEBUG=1
CC = ccache gcc
CFLAGS+=-O0
CFLAGS+=-ggdb3
USE_ASCIIDOCTOR=true
SANITIZE=leak,address
```

Kristoffer Haugsbakk (2):
  revision: add rdiff_other_arg to rev_info
  format-patch: handle range-diff on notes correctly for single patches

 builtin/log.c         |  7 +++----
 log-tree.c            |  3 ++-
 revision.h            |  1 +
 t/t3206-range-diff.sh | 16 +++++++++++++++-
 4 files changed, 21 insertions(+), 6 deletions(-)

base-commit: ca2559c1d630eb4f04cdee2328aaf1c768907a9e
-- 
2.51.0.270.gdb73cbc1bc1