chiark / gitweb /
wip changes for remote push - provide i_method
[dgit.git] / dgit
diff --git a/dgit b/dgit
index bac0baf0237880ce10948c60a9a6258af278fb5e..0908105357426821699bb0953a254f965fbcc02e 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1370,6 +1370,12 @@ sub i_cleanup {
     eval { rmtree $i_tmp; };
 }
 
     eval { rmtree $i_tmp; };
 }
 
+sub i_method {
+    my ($base,$selector,@args) = @_;
+    $selector =~ s/\-/_/g;
+    { no strict qw(refs); &{"${base}_${selector}"}(@args); }
+}
+
 sub cmd_rpush {
     my $host = nextarg;
     my $dir;
 sub cmd_rpush {
     my $host = nextarg;
     my $dir;