Hi!

On Mon, 2026-03-16 at 13:03:11 +0100, Guillem Jover wrote:
> This seems to be an artificial limitation in dgit. dpkg-source (via
> GNU patch) is capable of applying such changes, as long as they are
> in git patch format. Although it cannot produce them (currently)
> because GNU diff does not support generating git formatted patches.
> 
> This seems like a common misconception (even among dgit developers(?)
> and users, or at least has been in the past), but perhaps the dgit
> error and that GNU diff issue (and by extension «dpkg-source --commit»)
> does not help matters, or the dpkg-source documentation is lacking.
> Will look into whether the latter can be improved.

Well, I guess we could opportunistically make dpkg-source use
«git diff --no-index» over the two upstream pathnames (with no git
repos) if git is available, and fail otherwise in case of
unrepresentable diffs using GNU diff, with a hint to install git.
It should not be worse than the current situation at least. :)

I think I've not implemented this in the past, out of concern of
creating different behavior depending on the tools available, or
to avoid a hard-dependency on git in the build-essential set. But
given that the user will be getting an error anyway, that does not
look that bad, thinking about it now. I'll look into implementing
this as well.

> (As an example, I'm attaching a couple of patches and series file, to
> be placed on top of pci.ids to demonstrate this.)

Thanks,
Guillem

Reply via email to