#1128473 Feature request: ask dgit to hard-fail on top-level .gitignore diff

Package:
dgit
Source:
dgit
Submitter:
Simon Josefsson
Date:
2026-03-14 01:53:01 UTC
Severity:
normal
Tags:
#1128473#5
Date:
2026-02-20 07:47:05 UTC
From:
To:
The --quilt= autodetect feature is really powerful.  However I've
realized that there is no smoth way of using dgit to do what I would
prefer, which is:

1) Prefer --quilt=unapplied to hard-fail on upstream .gitignore diffs,
to allow me to notice the problem and fix it.

2) Only revert to --quilt=gbp if the last upload was made using it,
presumably because I intend for the repository to be incompatible with
--quilt=unapplied.

As far as I know, dgit is the only tool that makes me aware of
.gitignore diff's in packages.

Here is the actual problem I'm experiencing:

A) If I don't supply a --quilt= parameter, dgit will auto-detect that
.gitignore was modified and pick --quilt=gbp silently.  Then I have no
opportunity to fix this problem.

B) If I always supply a --quilt=unapplied there is more to type, which I
can deal with, but there is also an annoying warning:

git-debpush: check failed: unneeded --quilt=unapplied on command line, would have autodetected it ('superfluous-quilt-mode' check)
git-debpush: proceed anyway? (y/N) y

The final outcome is that dgit penalize a workflow that harmonize git
upstream branch with upstream git content.  I find that unfortunate and
contrary to the spirit of dgit workflows.

Thoughts?

Is there a -Wno-error=superfluous-quilt-mode?

/Simon

#1128473#10
Date:
2026-02-20 09:50:58 UTC
From:
To:
Hi.

Simon Josefsson writes ("Bug#1128473: Feature request: ask dgit to hard-fail on top-level .gitignore diff"):

My first question is, why is a diff to .gitignore a problem ?
IME improving the gitignore is a very routine thing to do during
packaging.  (As ever, one hopes that upstream takes the patch, at
least eventually.)

I don't think this is true.  The only quilt mode autodetection is in
git-debpush.  And it doesn't look at the contents of your package at
all, only metadata.

It finds the same quilt mode as you used last time.  Specifically, it
finds the last maintainer upload from the changelog (disregarding NMUs
by using Debian-specific version number rules) and looks for its
DEP-14 tag.  If that tag has dgit metadata with a quilt mode, it uses
that quilt mode by default.

If it can't figure out the last quilt mode this way, then you must
specify it on the command line.

dgit, on the other hand, doesn't do any of this.  It defaults
to --quilt=linear.

Yes, it's spelled  --force=superfluous-quilt-mode

If you had adopted git-debrebase, changes that you make to the
.gitignore would turn up as quilt patches in the normal way.  But
git-debrebase isn't something you can apply to an arbitrary package.

Regards,
Ian.

#1128473#15
Date:
2026-02-20 10:12:57 UTC
From:
To:
Ian Jackson writes ("Bug#1128473: Feature request: ask dgit to hard-fail on top-level .gitignore diff"):

I mean, it's not something you can apply to a package using a
different workflow.  One could adopt git-debrebase for most if not all
packages, but it involves converting the git branch.

Ian.