control: tag -1 +patch Hello,
On Sun 21 Jul 2019 at 03:02PM +01, Ian Jackson wrote:
> Sean Whitton writes ("Bug#932612: git-debpush: detect unstitched gdr branch"):
>> Package: git-debpush
>> Version: 9.4
>> Severity: wishlist
> ...
>> There should be a check for an unstitched gdr branch. Ian, can you
>> chime in with how this ought to be detected, please?
>
> Look for the ffq-prev ref. Any gdr unstitched branch will have such a
> corresponding ref. See STITCHING, PSEUDO-MERGES, FFQ RECORD in
> git-debrebase(5).
Thanks. Patch enclosed.
> For a detached head, this is not determinable, and gdr conclude is not
> possible either. So this means that git-debpush of a non-branch
> commitish must either be a forceable fail, or must skip this check.
I prefer the latter is better because I don't want to impose anything
extra on non-gdr users.
--
Sean Whitton
From ff37177f4dca9a9b19ad9f036660ff8908e51506 Mon Sep 17 00:00:00 2001 From: Sean Whitton <[email protected]> Date: Mon, 22 Jul 2019 10:39:56 +0100 Subject: [PATCH] git-debpush: Check for unstitched git-debrebase branch Signed-off-by: Sean Whitton <[email protected]> --- git-debpush | 14 ++++++++++++++ git-debpush.1.pod | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/git-debpush b/git-debpush index 982aa752..67d8feee 100755 --- a/git-debpush +++ b/git-debpush @@ -414,6 +414,20 @@ case "$quilt_mode" in ;; esac +# ---- git-debrebase branch format checks + +# only check branches, since you can't run `git debrebase conclude` on +# non-branches +case "$branch" in + refs/heads/*) + # see "STITCHING, PSEUDO-MERGES, FFQ RECORD" in git-debrebase(5) + ffq_prev_ref="${branch/refs/refs/ffq-prev}" + if git show-ref --quiet --verify "$ffq_prev_ref"; then + fail_check unstitched \ + "this looks like an unstitched git-debrebase branch, which should not be pushed" + fi +esac + # ---- Summary if $failed_check; then diff --git a/git-debpush.1.pod b/git-debpush.1.pod index dabc18f7..42e3470f 100644 --- a/git-debpush.1.pod +++ b/git-debpush.1.pod @@ -236,6 +236,11 @@ Ignore apparently pushing the dgit view of a package (as produced by B<dgit clone>) to the maintainer branch, where the dgit view and the maintainer view of the package are not identical. +=item B<unstitched> + +Ignore the fact that the branch to be pushed seems to be a +git-debrebase(1) branch in an unstitched state (see git-debrebase(5)). + =back =back -- 2.20.1
signature.asc
Description: PGP signature

