From: Sean Whitton Date: Mon, 22 Jul 2019 09:39:56 +0000 (+0100) Subject: git-debpush: Check for unstitched git-debrebase branch X-Git-Tag: archive/debian/9.5~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d859eec10fe463619069a01f4489b2a11af31fab;p=dgit.git git-debpush: Check for unstitched git-debrebase branch Closes: #932612 Signed-off-by: Sean Whitton --- diff --git a/git-debpush b/git-debpush index 84193751..402b1dd6 100755 --- a/git-debpush +++ b/git-debpush @@ -411,6 +411,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="refs/ffq-prev/${branch#refs/}" + 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 27b80c91..b9a908ef 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) to the maintainer branch, where the dgit view and the maintainer view of the package are not identical. +=item B + +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