chiark / gitweb /
dgit.git
14 months agoMerge branch 'gdr-manpages' into wip.rebase
Ian Jackson [Sun, 17 Jun 2018 22:02:06 +0000 (23:02 +0100)]
Merge branch 'gdr-manpages' into wip.rebase

14 months agodgit-maint-debrebase(7): Add cross-refs to git-debrebase(1) and (5)
Ian Jackson [Sun, 17 Jun 2018 22:01:39 +0000 (23:01 +0100)]
dgit-maint-debrebase(7): Add cross-refs to git-debrebase(1) and (5)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: add dgit-maint-debrebase.7 to .gitignore
Ian Jackson [Sun, 17 Jun 2018 21:59:46 +0000 (22:59 +0100)]
git-debrebase: add dgit-maint-debrebase.7 to .gitignore

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: git-debrebase: Do some tests without dgit installed
Ian Jackson [Sun, 17 Jun 2018 15:37:33 +0000 (16:37 +0100)]
test suite: git-debrebase: Do some tests without dgit installed

We provide a new psuedo-dependency NO-DGIT which throws away the usual
default dependency list.

We abolish NO-DEFAULT which could not be useful because the tests
pretty much all depend on setup/gnupg which (currently, as a
workaround for the gnupg2 races) requires chiark-utils-bin for
with-lock-ex.

There are two tests which don't actually need any interaction with the
archive.  Mark them accordingly.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Split into its own package
Ian Jackson [Sun, 17 Jun 2018 14:18:55 +0000 (15:18 +0100)]
git-debrebase: Split into its own package

* Provide and use Debian::Dgit::GDR which does the same for @INC as
  Debian::Dgit:Infra, only for GDR.  It's not *entirely* similar as
  its doc comment talks about ExitStatus too.

* In Makefile, split off lots of GDR_* variables and the
  two targets install-gdr and installdirs-gdr
  We take no care that only the required manpages are built for
  each install target; instead, they all go in MANPAGES and `all'.

* Add a control file stanza.  git-debrebase takes over the dependenc
  on libfile-fnmatch-perl.  We Recommend dgit and gbp.  (Even though
  if you're working with neither the Debian archive nor `3.0 (quilt)',
  you need neither.)

* In rules, add specpkg_install_gdr, to run the Makefile machinery.

* In the test dependencies, GDR now means to ask for git-debrebase and
  also git-buildpackage (for make-patches).  libfile-fnmatch-perl is
  handled via the dependencies of git-debrebase.deb.

* Add a .gitignore for the staging area in debian/

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: git-debrebase: Use gdr-convert-gbp-noarchive
Ian Jackson [Sun, 17 Jun 2018 21:12:39 +0000 (22:12 +0100)]
test suite: git-debrebase: Use gdr-convert-gbp-noarchive

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: gdr-convert-gbp-noarchive: new setup kind
Ian Jackson [Sun, 17 Jun 2018 16:18:06 +0000 (17:18 +0100)]
test suite: gdr-convert-gbp-noarchive: new setup kind

Introduce $ifnoarchive in gdr-convert-gbp, which allows us to run it
without any of the operations which touch the simulated archive.

This is faster.  Also in the future after we split the packages this
will make it possible to run this new setup without having dgit or the
archive management tools installed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Get perl -I for source tree right
Ian Jackson [Sun, 17 Jun 2018 16:18:44 +0000 (17:18 +0100)]
test suite: Get perl -I for source tree right

We wanted the Dgit.pm in the source tree (ie, the test suite's).
Previously this would work by accident, because Dgit.pm would be
installed in /usr.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: t-setup-done: get $import right setup using t-chain-test
Ian Jackson [Sun, 17 Jun 2018 16:18:06 +0000 (17:18 +0100)]
test suite: t-setup-done: get $import right setup using t-chain-test

We need to honour DGIT_TEST_NAME, rather than just using $0, in that
case.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: divergence checking: Do not mind if a ref we are checking does not...
Ian Jackson [Sun, 17 Jun 2018 16:25:16 +0000 (17:25 +0100)]
git-debrebase: divergence checking: Do not mind if a ref we are checking does not exist

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: git-debrebase: provide GDR "macro" for dependencies
Ian Jackson [Sun, 17 Jun 2018 15:31:49 +0000 (16:31 +0100)]
test suite: git-debrebase: provide GDR "macro" for dependencies

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: enumerate-tests: Refactor dependencies, support NO-DEFAULT
Ian Jackson [Sun, 17 Jun 2018 15:18:20 +0000 (16:18 +0100)]
test suite: enumerate-tests: Refactor dependencies, support NO-DEFAULT

This will allow more flexibility in a moment.

No users of NO-DEFAULT yet, and no functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodebian/rules: Refactor dgit-infrastructure perl arrangements
Ian Jackson [Sun, 17 Jun 2018 14:44:49 +0000 (15:44 +0100)]
debian/rules: Refactor dgit-infrastructure perl arrangements

We are going to want to do this for another package too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: Document gdr, and bump to 5.0~
Ian Jackson [Sun, 17 Jun 2018 12:30:08 +0000 (13:30 +0100)]
changelog: Document gdr, and bump to 5.0~

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodocumentation: Discuss gdr make-patches vs dgit quilt-fixup, etc.
Ian Jackson [Sun, 17 Jun 2018 12:29:03 +0000 (13:29 +0100)]
documentation: Discuss gdr make-patches vs dgit quilt-fixup, etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Use git-deborig style upstream commitish finding
Ian Jackson [Sun, 17 Jun 2018 12:04:39 +0000 (13:04 +0100)]
git-debrebase: Use git-deborig style upstream commitish finding

As discussed in email with Sean.

We could use git-deborig --just-print --version= but its error
handling is rather troublesome.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Add some plans for future, in a comment
Ian Jackson [Sun, 17 Jun 2018 11:48:27 +0000 (12:48 +0100)]
git-debrebase: Add some plans for future, in a comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: gdr-edits: Rely on dgit interop, and test that it DTRT
Ian Jackson [Sun, 17 Jun 2018 11:21:55 +0000 (12:21 +0100)]
test suite: gdr-edits: Rely on dgit interop, and test that it DTRT

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: t-gdr-good: Introduce etypes, a sequence
Ian Jackson [Sun, 17 Jun 2018 11:12:09 +0000 (12:12 +0100)]
git-debrebase: test suite: t-gdr-good: Introduce etypes, a sequence

Rather than having the next type recorded in netype, record it in
etypes.  This is more orthogonal, and will allow more subtle
specifications of what is expected.

No functional change for now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodgit: Interoperate with git-debrebase, automatically
Ian Jackson [Mon, 23 Apr 2018 11:45:58 +0000 (12:45 +0100)]
dgit: Interoperate with git-debrebase, automatically

* Recognise gdr branches, by the presence of corresponding
  ffq-prev or debrebase-last refs.

* Before trying to do our own multi-patch linear quilt fixup, on a gdr
  branch, see if gdr can do it.  If so that is faster and better.

* If our branch is an unstitched gdr branch, which would be ff from
  the archive if we were to stitch it, then do so.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodgit: Prepare for calling git-debrebase
Ian Jackson [Sun, 17 Jun 2018 00:21:43 +0000 (01:21 +0100)]
dgit: Prepare for calling git-debrebase

Provide the --git-debrebase= option, and pass it in the test suite.
Nothing uses this yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: gdr_ffq_prev_branchinfo: move from git-debrebase
Ian Jackson [Sat, 16 Jun 2018 23:36:55 +0000 (00:36 +0100)]
Dgit.pm: gdr_ffq_prev_branchinfo: move from git-debrebase

dgit is going to want this too, for interoperability.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: make-patched: Provide --quiet-would-amend
Ian Jackson [Sat, 16 Jun 2018 20:27:36 +0000 (21:27 +0100)]
git-debrebase: make-patched: Provide --quiet-would-amend

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: provide X checkletter
Ian Jackson [Sat, 16 Jun 2018 22:21:23 +0000 (23:21 +0100)]
git-debrebase: test suite: gdr-subcommands: provide X checkletter

No user yet.  I wanted this for a test which actually isn't going to
work like that, but I thought I would commit it anyway.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: use xopts for N*
Ian Jackson [Sat, 16 Jun 2018 22:20:43 +0000 (23:20 +0100)]
git-debrebase: test suite: gdr-subcommands: use xopts for N*

This stylistic change improves the orthogonality.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: split off XX
Ian Jackson [Sat, 16 Jun 2018 22:20:12 +0000 (23:20 +0100)]
git-debrebase: test suite: gdr-subcommands: split off XX

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: honour new $xopts
Ian Jackson [Sat, 16 Jun 2018 22:17:34 +0000 (23:17 +0100)]
git-debrebase: test suite: gdr-subcommands: honour new $xopts

This allows the introduction of chaining checkletters which modify
subsequent attempts.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: document XX
Ian Jackson [Sat, 16 Jun 2018 22:17:00 +0000 (23:17 +0100)]
git-debrebase: test suite: gdr-subcommands: document XX

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Change exit status for patch amendments, to 7
Ian Jackson [Sat, 16 Jun 2018 21:52:06 +0000 (22:52 +0100)]
git-debrebase: Change exit status for patch amendments, to 7

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: make_patches; Move get_differs into cmd_...
Ian Jackson [Sat, 16 Jun 2018 20:32:11 +0000 (21:32 +0100)]
git-debrebase: make_patches; Move get_differs into cmd_...

We want to make the error handling dependent on options, etc.  Moving
the differs analysis into cmd_make_patches avoids having a complex
calling convention for make_patches.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: Provide failmsg, previously buried in fail
Ian Jackson [Sat, 16 Jun 2018 21:46:04 +0000 (22:46 +0100)]
Dgit.pm: Provide failmsg, previously buried in fail

Most of `fail' is error message construction.  This change allows
callers to do something other with the message, than pass it to die.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: run gdr status
Ian Jackson [Sat, 16 Jun 2018 19:54:31 +0000 (20:54 +0100)]
git-debrebase: test suite: run gdr status

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide status subcommand
Ian Jackson [Sat, 16 Jun 2018 19:42:22 +0000 (20:42 +0100)]
git-debrebase: Provide status subcommand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: keycommits: Now $fatal hook
Ian Jackson [Sat, 16 Jun 2018 19:41:23 +0000 (20:41 +0100)]
git-debrebase: keycommits: Now $fatal hook

This allows a caller to avoid having keycommits crash on
unrecognisable stuff.  This will be used in a moment.

No functional change, because the default implementation calls fail
the same way it did before.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: keycommits abolish use of last etc.
Ian Jackson [Sat, 16 Jun 2018 19:40:31 +0000 (20:40 +0100)]
git-debrebase: keycommits abolish use of last etc.

Previously, presumably, this little fragment was within an anonymous
sub.  Now it isn't any more, and we can simply return.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: keycommits: Pass $cl to callbacks
Ian Jackson [Sat, 16 Jun 2018 15:47:34 +0000 (16:47 +0100)]
git-debrebase: keycommits: Pass $cl to callbacks

No overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: keycommits: Move up $cl (nfc)
Ian Jackson [Sat, 16 Jun 2018 15:44:36 +0000 (16:44 +0100)]
git-debrebase: keycommits: Move up $cl (nfc)

We are going to want this within the scope of the anon sub $x.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Fix multi-orig handling
Ian Jackson [Sat, 16 Jun 2018 10:50:17 +0000 (11:50 +0100)]
git-debrebase: Fix multi-orig handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Fix snagging
Ian Jackson [Sat, 9 Jun 2018 12:08:51 +0000 (13:08 +0100)]
git-debrebase: Fix snagging

* Rename $snags_checked to $snags_summarised and make it a counter
  of the snags we have summarised in snags_maybe_bail.
* Introduce all_snags_summarised, which uses arithmetic to see if
  we have had new snags since the most recent snags_maybe_bail,
* Use this in run_deferred_updates rather than the existing
  approach; this means we can crash if there were new snags for
  which we should have bailed.
* Make snags_maybe_bail not produce a redundant identical summary.
* Initialise counters to 0 so arithmetic does not give undef warnings.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Some notes on anchor parent ordering
Ian Jackson [Fri, 8 Jun 2018 22:46:41 +0000 (23:46 +0100)]
git-debrebase: Some notes on anchor parent ordering

This is the result of some playing around with gitk.  Notably,
for example,
  git-branch -f t dgit/stretch-security && ~/things/Dgit/play/swap-pseudomerges -f RELEASE-4.8.0..t
where dgit/stretch-security is c9517ee45383271e90f40b7a9773d1e6fefaeca7
and swap-pseudomerges is something like this

  #!/bin/sh
  #
  # runs
  #   git-filter-branch --some-filters "$@"

  set -e

  git-filter-branch --parent-filter '
  case "$(git cat-file commit $GIT_COMMIT)" in
  *"git-debrebase new-upstream breakwater"*|*"git-debrebase anchor"*)
  perl -ne '\''
  chomp;
  print join " ", reverse split / +(?=-p )/;
  print "\n";
  '\''
  ;;
  *)
  cat
  esac
  ' "$@"

or
  ....
*"git-debrebase new-upstream breakwater"*|*"git-debrebase anchor"*)
  ....

and then runes like

  gitk --first-parent dgit/stretch-security &
  gitk dgit/stretch-security -- ':/' ':!/debian' &

etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoCommentary: explain why pseudomerges are the way round they are
Ian Jackson [Fri, 8 Jun 2018 22:31:02 +0000 (23:31 +0100)]
Commentary: explain why pseudomerges are the way round they are

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodgit: Bail if single-debian-patch needs committing with --quilt=nofix
Ian Jackson [Mon, 23 Apr 2018 00:16:06 +0000 (01:16 +0100)]
dgit: Bail if single-debian-patch needs committing with --quilt=nofix

Also, if the user invokes dgit push with uncommitted debian/patches/.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodgit: Break out quiltify_nofix_bail (nfc)
Ian Jackson [Mon, 23 Apr 2018 00:15:50 +0000 (01:15 +0100)]
dgit: Break out quiltify_nofix_bail (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Change badusage exit status to 8
Ian Jackson [Sat, 16 Jun 2018 12:47:52 +0000 (13:47 +0100)]
git-debrebase: Change badusage exit status to 8

This matches dgit.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoexit status: Document in changelog.
Ian Jackson [Sat, 16 Jun 2018 12:47:26 +0000 (13:47 +0100)]
exit status: Document in changelog.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoexit status: Fix dgit-badcommit-fixup to use Debian::Dgit::ExitStatus
Ian Jackson [Sat, 16 Jun 2018 12:44:27 +0000 (13:44 +0100)]
exit status: Fix dgit-badcommit-fixup to use Debian::Dgit::ExitStatus

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoexit status: Fix git-debrebase to use Debian::Dgit::ExitStatus
Ian Jackson [Sat, 16 Jun 2018 12:43:53 +0000 (13:43 +0100)]
exit status: Fix git-debrebase to use Debian::Dgit::ExitStatus

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoexit status: Fix dgit to use Debian::Dgit::ExitStatus
Ian Jackson [Sat, 16 Jun 2018 12:43:10 +0000 (13:43 +0100)]
exit status: Fix dgit to use Debian::Dgit::ExitStatus

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoexit status: Introdude Debian::Dgit::ExitStatus
Ian Jackson [Sat, 16 Jun 2018 12:41:00 +0000 (13:41 +0100)]
exit status: Introdude Debian::Dgit::ExitStatus

No callers yet.

Also, no version for dgit-infrastructure.  The one perl script in
dgit-infrastructure that cares a lot about its exit status
(dgit-repos-policy-debian) already has an END { } and uses _exit,
which is a bit like our approach here, but simpler.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Implement make-patches
Ian Jackson [Sun, 22 Apr 2018 23:32:43 +0000 (00:32 +0100)]
git-debrebase: Implement make-patches

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: Add some t-git-next-date
Ian Jackson [Sun, 22 Apr 2018 23:32:05 +0000 (00:32 +0100)]
git-debrebase: test suite: gdr-subcommands: Add some t-git-next-date

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Run gbp pq export only from (perhaps private) laundered branch
Ian Jackson [Sun, 22 Apr 2018 23:29:31 +0000 (00:29 +0100)]
git-debrebase: Run gbp pq export only from (perhaps private) laundered branch

When the branch is stitched, gbp pq will descend into both sides of
the pseudomerge.  This will duplicate patches and be generally bad.

So instead, use walk to generate, privately, a laundered version of
HEAD, to use to generate the patches.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Break out make_patches_staged (nfc)
Ian Jackson [Sun, 22 Apr 2018 22:38:00 +0000 (23:38 +0100)]
git-debrebase: Break out make_patches_staged (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: conclude, quick: uncleanness after laundry is fatal
Ian Jackson [Sun, 22 Apr 2018 22:32:36 +0000 (23:32 +0100)]
git-debrebase: conclude, quick: uncleanness after laundry is fatal

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Defend against missing snags_maybe_bail calls
Ian Jackson [Sun, 22 Apr 2018 22:27:26 +0000 (23:27 +0100)]
git-debrebase: Defend against missing snags_maybe_bail calls

Almost the only thing gdr does as an output is to update HEAD and
other refs.  That's done with run_deferred_updates.  So, there,
check that (i) we have called snags_maybe_bail at least once;
(ii) we have not had any snags since.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Add a several missing snags_maybe_bail calls
Ian Jackson [Sun, 22 Apr 2018 22:23:15 +0000 (23:23 +0100)]
git-debrebase: Add a several missing snags_maybe_bail calls

That these were missing is a bit alarming.  I am about to add some
more defences against missing this check.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Fix a message to use "" properly
Ian Jackson [Sun, 22 Apr 2018 22:22:53 +0000 (23:22 +0100)]
git-debrebase: Fix a message to use "" properly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: gdr-subcommands: Better error handling/debugging
Ian Jackson [Sun, 22 Apr 2018 22:22:24 +0000 (23:22 +0100)]
git-debrebase: test suite: gdr-subcommands: Better error handling/debugging

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Do not mind stitching an unlaundered branch
Ian Jackson [Sun, 22 Apr 2018 21:46:28 +0000 (22:46 +0100)]
git-debrebase: Do not mind stitching an unlaundered branch

 <Diziet> I discover that stitch treats non-launderedness as a snag.
 <Diziet> This is not quite compatible with these newfangled
          push-your-unlaundered-stuff workflows.
 <Diziet> It would be possible to make one of prepush or stitch
          (currently synonyms) behave differently in this respect.

 <spwhitton> do you know why stitch treats non-launderedness as a snag?
 <spwhitton> given that we expect [most people] to use `git debrebase
          conclude`, which launders, and never invoke `git debrebase
          stitch` explicitly, it would be okay to change that such
          that `git debrebase stitch` does not consider
          non-launderedness to be a snag.

 <Diziet> I think it does that just because I am the kind of person
          who thinks, when writing some routine, "what could I check
          here?" :-)
 <Diziet> I think you are perhaps right that it ought not to.
 <Diziet> "conclude" didn't exist then of course.

 <spwhitton> okay.  git-debrebase(1) could note "you probably want
          conclude because you probably want to launder"

 <Diziet> Mmmm.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: do_stitch: Introduce $unclean argument
Ian Jackson [Sun, 22 Apr 2018 21:43:56 +0000 (22:43 +0100)]
git-debrebase: do_stitch: Introduce $unclean argument

Update all call sites.  No functional change just yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide "prepush"
Ian Jackson [Sun, 22 Apr 2018 21:35:58 +0000 (22:35 +0100)]
git-debrebase: Provide "prepush"

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide and test "conclude"
Ian Jackson [Sun, 22 Apr 2018 21:28:49 +0000 (22:28 +0100)]
git-debrebase: Provide and test "conclude"

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(1): Fix to say that noop is always ok for "quick"
Ian Jackson [Sun, 22 Apr 2018 21:27:07 +0000 (22:27 +0100)]
git-debrebase(1): Fix to say that noop is always ok for "quick"

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(1): Very minor clarification to "quick"
Ian Jackson [Sun, 22 Apr 2018 21:26:40 +0000 (22:26 +0100)]
git-debrebase(1): Very minor clarification to "quick"

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: test suite: New test for subcommands
Ian Jackson [Sun, 22 Apr 2018 21:14:55 +0000 (22:14 +0100)]
git-debrebase: test suite: New test for subcommands

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Rename `conclude' to `quick'
Ian Jackson [Sun, 22 Apr 2018 21:13:59 +0000 (22:13 +0100)]
git-debrebase: Rename `conclude' to `quick'

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: comment: explain why tagged linear anchors are evil
Ian Jackson [Sun, 22 Apr 2018 17:54:31 +0000 (18:54 +0100)]
git-debrebase: comment: explain why tagged linear anchors are evil

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Only make finalised changelog entries
Ian Jackson [Sun, 22 Apr 2018 16:20:09 +0000 (17:20 +0100)]
git-debrebase: Only make finalised changelog entries

Unfortunately, finalised UNRELEASED has become the dominant convention
in Debian.  So conform to that.

Also this breaks a test, which assumed that the operation date did not
leak into the output tree.  But, sadly, now it does.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Do not run a no-op rebase in default mode
Ian Jackson [Sun, 22 Apr 2018 16:01:32 +0000 (17:01 +0100)]
git-debrebase: Do not run a no-op rebase in default mode

No functional change: this is always a no-op, since $breakwater is one
of HEAD's ancestors.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Handle -i option as a git-rebase option
Ian Jackson [Sun, 22 Apr 2018 15:38:51 +0000 (16:38 +0100)]
git-debrebase: Handle -i option as a git-rebase option

Ie, as a request to do a rebase.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide conclude subcommand
Ian Jackson [Sun, 22 Apr 2018 15:12:56 +0000 (16:12 +0100)]
git-debrebase: Provide conclude subcommand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: break out do_stitch (nfc)
Ian Jackson [Sun, 22 Apr 2018 15:12:13 +0000 (16:12 +0100)]
git-debrebase: break out do_stitch (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: avoid stack trace from badusage()
Ian Jackson [Sun, 22 Apr 2018 15:52:29 +0000 (16:52 +0100)]
git-debrebase: avoid stack trace from badusage()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Improve/fix handling of $prose
Ian Jackson [Sun, 22 Apr 2018 15:07:00 +0000 (16:07 +0100)]
git-debrebase: Improve/fix handling of $prose

Allow specification of the whole prose.  Set the default in
cmd_stitch.  Always include the word `stitch' in the reflog.

Also fix a comment typo.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Rename `problem'/`fproblem' to `snag'
Ian Jackson [Sun, 22 Apr 2018 12:27:45 +0000 (13:27 +0100)]
git-debrebase: Rename `problem'/`fproblem' to `snag'

And add a cross-reference the first time it's mentioned in the
manpage.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: introduce ffq_prev_info (nfc)
Ian Jackson [Thu, 5 Apr 2018 19:20:30 +0000 (20:20 +0100)]
git-debrebase: introduce ffq_prev_info (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Break out do_launder_head (nfc)
Ian Jackson [Thu, 29 Mar 2018 18:48:04 +0000 (19:48 +0100)]
git-debrebase: Break out do_launder_head (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: break out stitch() (nfc)
Ian Jackson [Sun, 25 Mar 2018 16:11:41 +0000 (17:11 +0100)]
git-debrebase: break out stitch() (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: rename $drlast to $gdrlast (nfc)
Ian Jackson [Sun, 22 Apr 2018 11:52:47 +0000 (12:52 +0100)]
git-debrebase: rename $drlast to $gdrlast (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(1): Further manpage improvement
Ian Jackson [Wed, 18 Apr 2018 17:31:12 +0000 (18:31 +0100)]
git-debrebase(1): Further manpage improvement

Prompted by email from Sean.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): We are going to generate patches ourselves
Ian Jackson [Sun, 15 Apr 2018 15:59:07 +0000 (16:59 +0100)]
git-debrebase(5): We are going to generate patches ourselves

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Corrections and clarifications to dgit import
Ian Jackson [Sun, 15 Apr 2018 15:56:29 +0000 (16:56 +0100)]
git-debrebase(5): Corrections and clarifications to dgit import

Also untabify those diagrams.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Untabify the diagram a bit
Ian Jackson [Sun, 15 Apr 2018 15:56:00 +0000 (16:56 +0100)]
git-debrebase(5): Untabify the diagram a bit

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Some minor cross-reference additions to TERMINOLOGY
Ian Jackson [Sun, 15 Apr 2018 15:53:56 +0000 (16:53 +0100)]
git-debrebase(5): Some minor cross-reference additions to TERMINOLOGY

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(1),(5): More changes from conversation with Sean
Ian Jackson [Sat, 14 Apr 2018 15:24:23 +0000 (16:24 +0100)]
git-debrebase(1),(5): More changes from conversation with Sean

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Move TERMINOLOGY earlier
Ian Jackson [Sat, 14 Apr 2018 12:58:42 +0000 (13:58 +0100)]
git-debrebase(5): Move TERMINOLOGY earlier

As suggested by Sean.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Improvements from Sean
Ian Jackson [Thu, 12 Apr 2018 00:11:49 +0000 (01:11 +0100)]
git-debrebase(5): Improvements from Sean

Suggested in or prompted by Sean's mail of 28th March.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Rework the description a bit
Ian Jackson [Wed, 11 Apr 2018 23:29:50 +0000 (00:29 +0100)]
git-debrebase(5): Rework the description a bit

Mention whether branches and branch states are ff.  And describe the
breakwater.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(1): Improvements from Sean
Ian Jackson [Wed, 11 Apr 2018 23:25:15 +0000 (00:25 +0100)]
git-debrebase(1): Improvements from Sean

Suggested in or prompted by Sean's mail of 28th March.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide anchor subcommand
Ian Jackson [Sun, 25 Mar 2018 16:10:49 +0000 (17:10 +0100)]
git-debrebase: Provide anchor subcommand

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Rework keycommits out of breakwater_of
Ian Jackson [Sun, 25 Mar 2018 16:06:32 +0000 (17:06 +0100)]
git-debrebase: Rework keycommits out of breakwater_of

* Return the anchor too
* More flexible special case handling
* Call sites adjusted, resulting in fixes to special case handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: stitch: make noop actually be a no-op
Ian Jackson [Sun, 25 Mar 2018 11:56:54 +0000 (12:56 +0100)]
git-debrebase: stitch: make noop actually be a no-op

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: stitch: check the branch is laundered
Ian Jackson [Sun, 25 Mar 2018 11:55:07 +0000 (12:55 +0100)]
git-debrebase: stitch: check the branch is laundered

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: breakwater_of: permit unclean to be an fproblem
Ian Jackson [Sun, 25 Mar 2018 11:53:59 +0000 (12:53 +0100)]
git-debrebase: breakwater_of: permit unclean to be an fproblem

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: maintain debrebase-last
Ian Jackson [Sun, 25 Mar 2018 11:33:28 +0000 (12:33 +0100)]
git-debrebase: maintain debrebase-last

This is mostly for the benefit of dgit(1), which wants to know whether
to run gdr to do quilt fixup.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: ffq_prev_branchinfo: return $drlast
Ian Jackson [Sun, 25 Mar 2018 11:07:19 +0000 (12:07 +0100)]
git-debrebase: ffq_prev_branchinfo: return $drlast

No functional change yet as no-one uses this information.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: provide $gdrlast_refprefix
Ian Jackson [Sun, 25 Mar 2018 11:05:45 +0000 (12:05 +0100)]
Dgit.pm: provide $gdrlast_refprefix

No users yet so no functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): minor improvements
Ian Jackson [Mon, 19 Feb 2018 01:56:44 +0000 (01:56 +0000)]
git-debrebase(5): minor improvements

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: NOTES updates
Ian Jackson [Mon, 19 Feb 2018 01:43:57 +0000 (01:43 +0000)]
git-debrebase: NOTES updates

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: move some todo/notes to NOTES
Ian Jackson [Mon, 19 Feb 2018 01:39:50 +0000 (01:39 +0000)]
git-debrebase: move some todo/notes to NOTES

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>