summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-debrebase13
1 files changed, 10 insertions, 3 deletions
diff --git a/git-debrebase b/git-debrebase
index 54431a7..f79aef5 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -494,12 +494,19 @@ sub classify ($) {
return $unknown->("complex merge");
}
-sub breakwater_of ($) {
- my ($head) = @_; # must be laundered
+sub breakwater_of ($;$) {
+ my ($head, $unclean_fproblem_tag) = @_;
+ # $head should be laundered; if not, $unclean_fproblem_tag controls:
+ # if falseish, calls fail; otherwise, calls fproblem and returns undef
my $breakwater;
my $unclean = sub {
my ($why) = @_;
- fail "branch needs laundering (run git-debrebase): $why";
+ my $m = "branch needs laundering (run git-debrebase): $why";
+ fail $m unless $unclean_fproblem_tag;
+ fproblem $unclean_fproblem_tag, $m;
+ $breakwater = undef;
+ no warnings qw(exiting);
+ last;
};
for (;;) {
my $cl = classify $head;