summaryrefslogtreecommitdiff
path: root/lib/Git/Annex.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Git/Annex.pm')
-rw-r--r--lib/Git/Annex.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm
index 625f93d..5312083 100644
--- a/lib/Git/Annex.pm
+++ b/lib/Git/Annex.pm
@@ -55,7 +55,6 @@ use warnings;
use Cwd;
use File::chdir;
use Git::Wrapper;
-use Git::Annex::Wrapper;
use Git::Repository;
use Try::Tiny;
use File::Spec::Functions qw(catfile rel2abs);
@@ -315,6 +314,16 @@ sub _git_path {
rel2abs $path, $self->toplevel;
}
+package Git::Annex::Wrapper {
+ AUTOLOAD {
+ my $self = shift;
+ (my $subcommand = our $AUTOLOAD) =~ s/.+:://;
+ return if $subcommand eq "DESTROY";
+ $subcommand =~ tr/_/-/;
+ $$self->git->RUN("annex", $subcommand, @_);
+ }
+}
+
=attr annex
Gives access to git-annex subcommands in the same way that