chiark / gitweb /
git-debrebase: Refuse to start conversion if ffq-prev exists
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 22:16:17 +0000 (23:16 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 22:43:07 +0000 (23:43 +0100)
Trying to rerun git-debrebase convert-from-something, on an unstitched
gdr branch, would end in tears.  Forbid it utterly.

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

index 630b8c2..059d02b 100755 (executable)
@@ -2412,6 +2412,10 @@ sub check_series_has_all_patches ($) {
 
 sub begin_convert_from () {
     my $head = get_head();
+    my ($ffqs, $ffqm, $symref, $ffq_prev, $gdrlast) = ffq_prev_branchinfo();
+
+    fail "ffq-prev exists, this is already managed by git-debrebase!"
+       if $ffq_prev && git_get_ref $ffq_prev;
     return ($head, undef);
 }