Bug#1081434: dpkg-source: should refuse to apply indented diffs, or at least give a warning

Simon McVittie <[email protected]> Fri, 6 Feb 2026 13:22:51 +0000
Newsgroups gmane.linux.debian.devel.dpkg.bugs
Message-ID <aYXrK7-2PgemNA0R__24099.65664135$1770384326$gmane$org@remnant.pseudorandom.co.uk>
Control: tags -1 + patch

I was reminded of this by an indented diff similar to my GTK example 
accidentally getting into Debian's i3 package recently 
(https://bugs.debian.org/1126992). See also 
https://bugs.debian.org/1081436 in which I suggested that `gbp pq 
export` could avoid this indented-diff-in-commit-message pattern.

On Sun, 02 Mar 2025 at 08:59:58 +0000, Tj wrote:
>Seeking beyond the patch header before spawning the system patch tool solves
>this in all my local testing, including using Simon's example patch that
>triggered this.

This seems like quite an elegant solution to this - if dpkg is already 
aware of the boundary between header and patch, it adds very little new 
code to be able to do this.

Guillem, would you be willing to consider Tj's patch? At least for 
unstable?

     smcv