Files
git/builtin
Kristoffer Haugsbakk 04657ac029 format-patch: make format.noprefix a boolean
The config `format.noprefix` was added in 8d5213de (format-patch: add
format.noprefix option, 2023-03-09) to support no-prefix on paths.
That was immediately after making git-format-patch(1) not respect
`diff.noprefix`.[1]

The intent was to mirror `diff.noprefix`. But this config was
unintentionally[2] implemented by enabling no-prefix if any kind of
value is set.

† 1: c169af8f (format-patch: do not respect diff.noprefix, 2023-03-09)
† 2: https://lore.kernel.org/all/20260211073553.GA1867915@coredump.intra.peff.net/

Let’s indeed mirror `diff.noprefix` by treating it as a boolean.

This is a breaking change. And as far as breaking changes go it is
pretty benign:

• The documentation claims that this config is equivalent to
  `diff.noprefix`; this is just a bug fix if the documentation is
  what defines the application interface
• Only users with non-boolean values will run into problems when we
  try to parse it as a boolean. But what would (1) make them suspect
  they could do that in the first place, and (2) have motivated them to
  do it?
• Users who have set this to `false` and expect that to mean *enable
  format.noprefix* (current behavior) will now have the opposite
  experience. Which is not a reasonable setup.

Let’s only offer a breaking change fig leaf by advising about the
previous behavior before dying.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-23 15:55:19 -08:00
..
2025-10-02 12:26:11 -07:00
2025-11-19 10:55:39 -08:00
2025-12-05 14:49:56 +09:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2025-08-22 13:13:20 -07:00
2024-12-18 10:44:31 -08:00
2025-07-16 22:16:15 -07:00
2025-07-23 08:15:18 -07:00
2025-12-25 08:29:27 +09:00
2025-08-21 13:47:00 -07:00
2025-10-02 12:26:12 -07:00
2026-01-06 07:30:16 +09:00
2025-07-23 08:15:18 -07:00
2025-11-19 10:55:39 -08:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-09-16 11:37:06 -07:00
2025-08-21 13:46:59 -07:00