Wouter Verhelst <[email protected]> writes:

> So, in the git repository for most of my packages, I have a
> debian/source/local-options that says "single-debian-patch".

> IMAO, the whole idea of dpkg-source --commit is stupid. It tries to
> replicate what git already does. Committing changesets to separate
> package patches with a suboptimal version control system is something
> that takes away time and effort from me that I could better spend doing
> something useful. So I tell dpkg to not bother by just setting
> debian/source/local-options to single-debian-patch. My debian/control
> file sets the correct Vcs-* headers to point to the git repository; if
> you need to understand what's happening, you can just look there.

Sean answered your actual question, but as someone else who used to use
that workflow, take a look at git-debrebase. dgit-maint-debrebase(7)
describes the workflow.

What git-debrebase does under the hood is quite complex, but you can
mostly ignore it. The UI it exposes to you is that you can commit changes
to upstream source normally, as with any other Git repository, and when
you build the source package, all your upstream changes will be broken out
into separate patches in debian/patches using the commit message as the
patch header. Most of the time, the only constraint you have to follow is
to make sure to never make a single Git commit that changes both Debian
packaging files and the upstream source.

There are more details about rebases and whatnot in the man page.

If you do take that approach, I also recommend:

    git config --add --local dgit.default.split-view always

which tells dgit to not commit debian/patches to your main working branch
or expose it on Salsa. It's still present in the dgit view of your
repository as uploaded, so that the dgit view matches the source package,
but that way you don't have the output-only clutter of the broken-out
patches in your working directory and don't have to remember to not touch
those files.

-- 
Russ Allbery ([email protected])              <https://www.eyrie.org/~eagle/>

Reply via email to