dgit 4.2, which is now in Debian unstable, has a new subcommand: dgit
push-source. This is just like dgit push, except that
- it forces a source-only upload; and
- it also takes care of preparing the
_source.changes, transparently, without the user needing to rundpkg-buildpackage -Sordgit build-sourceor whatever.
push-source is useful to ensure you don’t accidently upload
binaries, and that was its original motivation. But there is a deeper
significance to this new command: to say
% dgit push-source unstable
is, in one command, basically to say
% git push ftp-master HEAD:unstable
That is: dgit push-source is like doing a single-step git push of
your git HEAD straight into the archive! The future is now!
The contrast here is with ordinary dgit push, which is not analogous
to a single git push command, because
- it involves uploading .debs, which make a material change to the archive other than updating the source code of the package; and
- it must be preceded by a call to
dpkg-buildpackage,dgit sbuildor similar to prepare the.changesfile.
While dgit push-source also involves uploading files to ftp-master
in addition to the git push, because that happens transparently and
does not require the user to run a build command, it can be thought of
as an implementation detail.
Two remaining points of disanalogy:
git pushwill push your HEAD no matter the state of the working tree, butdgit push-sourcehas to clean your working tree. I’m thinking about ways to improve this.For non-native packages, you still need an
orig.tarin... Urgh. At least that’s easy to obtain thanks to git-deborig.