diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-03-25 12:53:59 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-16 16:07:00 +0100 |
commit | 2e4434dbec72dd4a042d2fc3beab9db88943b2c8 (patch) | |
tree | 48aa753df1230de88d4cb05e3a979211cf15ff70 /git-debrebase | |
parent | 58cd6d7cf9c2e0c5faba010744079881da008fea (diff) |
git-debrebase: breakwater_of: permit unclean to be an fproblem
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 13 |
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; |