chiark / gitweb /
git-debpush: Check for unstitched git-debrebase branch
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 22 Jul 2019 09:39:56 +0000 (10:39 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Jul 2019 16:08:51 +0000 (17:08 +0100)
Closes: #932612
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
git-debpush
git-debpush.1.pod

index 841937510b6f1666cafb52dc43cc490cd102d001..402b1dd6a14d5b13df45fb488f36520acbcf6319 100755 (executable)
@@ -411,6 +411,20 @@ case "$quilt_mode" in
         ;;
 esac
 
         ;;
 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
 # ---- Summary
 
 if $failed_check; then
index 27b80c913246b6454609b554c5f484327141bf70..b9a908efe44b6d7800a922550f74210f92b2be38 100644 (file)
@@ -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.
 
 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
 =back
 
 =back