summaryrefslogtreecommitdiff
path: root/lib/App/annex_to_annex_dropunused.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/annex_to_annex_dropunused.pm')
-rw-r--r--lib/App/annex_to_annex_dropunused.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/App/annex_to_annex_dropunused.pm b/lib/App/annex_to_annex_dropunused.pm
index 89b16b5..23c8851 100644
--- a/lib/App/annex_to_annex_dropunused.pm
+++ b/lib/App/annex_to_annex_dropunused.pm
@@ -47,6 +47,9 @@ documentation for that command.
=cut
sub main {
+ shift if $_[0] and ref $_[0] eq ""; # in case main called as a class method
+ local @ARGV = @{ $_[0] } if $_[0] and ref $_[0] ne "";
+
my $annex = Git::Annex->new;
my @to_drop;