chiark / gitweb /
git-debrebase: keycommits: Pass $cl to callbacks
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:47:34 +0000 (16:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 21:40:14 +0000 (22:40 +0100)
No overall functional change.

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

index cb0276be1e9778c36d17a0955ecd1e3d0f98ed2b..c0600126ba5df7701c6823330bd6d030c2ddec4f 100755 (executable)
@@ -238,8 +238,8 @@ sub make_commit ($$) {
 }
 
 our @snag_force_opts;
-sub snag ($$) {
-    my ($tag,$msg) = @_;
+sub snag ($$;@) {
+    my ($tag,$msg) = @_; # ignores extra args, for benefit of keycommits
     if (grep { $_ eq $tag } @snag_force_opts) {
        $snags_forced++;
        print STDERR "git-debrebase: snag ignored (-f$tag): $msg\n";
@@ -542,9 +542,9 @@ sub keycommits ($;$$$) {
     my ($head, $furniture, $unclean, $trouble) = @_;
     # => ($anchor, $breakwater)
 
-    # $unclean->("unclean-$tagsfx", $msg)
-    # $furniture->("unclean-$tagsfx", $msg)
-    # $dgitimport->("unclean-$tagsfx", $msg)
+    # $unclean->("unclean-$tagsfx", $msg, $cl)
+    # $furniture->("unclean-$tagsfx", $msg, $cl)
+    # $dgitimport->("unclean-$tagsfx", $msg, $cl))
     #   is callled for each situation or commit that
     #   wouldn't be found in a laundered branch
     # $furniture is for furniture commits such as might be found on an
@@ -567,7 +567,7 @@ sub keycommits ($;$$$) {
        my $m = "branch needs laundering (run git-debrebase): $why";
        fail $m unless defined $cb;
        return unless $cb;
-       $cb->("unclean-$tagsfx", $why);
+       $cb->("unclean-$tagsfx", $why, $cl);
     };
     for (;;) {
        $cl = classify $head;