chiark / gitweb /
git-debrebase: Provide snags_maybe_bail_early
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jul 2018 18:43:06 +0000 (19:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jul 2018 23:15:21 +0000 (00:15 +0100)
No callers yet.

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

index 83abc3b..f1ae053 100755 (executable)
@@ -276,6 +276,11 @@ sub snags_maybe_bail () {
     }
     $snags_summarised = $snags_forced + $snags_tripped;
 }
+sub snags_maybe_bail_early () {
+    # useful to bail out early without doing a lot of work;
+    # not a substitute for snags_maybe_bail.
+    snags_maybe_bail() if $snags_tripped && !$opt_force;
+}
 sub any_snags () {
     return $snags_forced || $snags_tripped;
 }