git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kristofferhaugsbakk@fastmail.com
To: git@vger.kernel.org
Cc: Kristoffer Haugsbakk <code@khaugsbakk.name>
Subject: [PATCH 0/2] format-patch: handle range-diff on notes correctly for single patches
Date: Mon, 22 Sep 2025 23:10:21 +0200	[thread overview]
Message-ID: <cover.1758574974.git.code@khaugsbakk.name> (raw)

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

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


             reply	other threads:[~2025-09-22 21:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 21:10 kristofferhaugsbakk [this message]
2025-09-22 21:10 ` [PATCH 1/2] revision: add rdiff_other_arg to rev_info kristofferhaugsbakk
2025-09-22 21:58   ` Junio C Hamano
2025-09-23 15:53     ` Kristoffer Haugsbakk
2025-09-23 17:35       ` Junio C Hamano
2025-09-23 17:47         ` Kristoffer Haugsbakk
2025-09-23 21:18           ` Junio C Hamano
2025-09-22 21:10 ` [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
2025-09-22 22:01   ` Junio C Hamano
2025-09-23 16:26     ` Kristoffer Haugsbakk
2025-09-23 21:20       ` Junio C Hamano
2025-09-25 17:07 ` [PATCH v2 0/3] " kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 1/3] range-diff: rename other_arg to log_arg kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 2/3] revision: add rdiff_log_arg to rev_info kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 3/3] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1758574974.git.code@khaugsbakk.name \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).