summaryrefslogtreecommitdiff
path: root/lib/Git/Annex.pm
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-10 20:55:31 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-10 20:56:26 -0700
commitb8dbaa0149d7f300a608bb1ee92178b29589617a (patch)
tree154391377a932bec95e8ed8e2340e2b4dc683ce6 /lib/Git/Annex.pm
parentd5003c566d49b2c43726dc0575dd934476e5f9a4 (diff)
downloadp5-Git-Annex-b8dbaa0149d7f300a608bb1ee92178b29589617a.tar.gz
put Git::Annex::Wrapper in its own file
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'lib/Git/Annex.pm')
-rw-r--r--lib/Git/Annex.pm11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm
index 9449a7d..209c55f 100644
--- a/lib/Git/Annex.pm
+++ b/lib/Git/Annex.pm
@@ -55,6 +55,7 @@ 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);
@@ -279,16 +280,6 @@ 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