From 8c5c28070f599b437033743786cbf5bdec08ca5d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 8 Feb 2020 12:05:54 -0700 Subject: comment out Git::Repository instance for now Git::Annex::BatchCommand is doing what I thought I would use the Git::Repository instance for. Signed-off-by: Sean Whitton --- lib/Git/Annex.pm | 18 +++++++++--------- t/10_init.t | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm index 031148c..7080e88 100644 --- a/lib/Git/Annex.pm +++ b/lib/Git/Annex.pm @@ -86,18 +86,18 @@ has git => ( is => 'lazy', default => sub { Git::Wrapper->new(shift->toplevel) }); -=attr repo +# =attr repo -Returns an instance of L initialised in the repository. +# Returns an instance of L initialised in the repository. -=cut +# =cut -has repo => ( - is => 'lazy', - # we don't know (here) whether our repo is bare or not, so we - # don't know whether to use the git_dir or work_tree arguments to - # Git::Repository::new, so we chdir and let call without arguments - default => sub { local $CWD = shift->toplevel; Git::Repository->new }); +# has repo => ( +# is => 'lazy', +# # we don't know (here) whether our repo is bare or not, so we +# # don't know whether to use the git_dir or work_tree arguments to +# # Git::Repository::new, so we chdir and let call without arguments +# default => sub { local $CWD = shift->toplevel; Git::Repository->new }); =method unused(%opts) diff --git a/t/10_init.t b/t/10_init.t index e646b14..9e50a93 100755 --- a/t/10_init.t +++ b/t/10_init.t @@ -34,16 +34,16 @@ use File::Spec::Functions qw(catfile file_name_is_absolute); is $annex->git->dir, $temp, "Git::Wrapper has correct toplevel"; } -# lazy init of Git::Repository object requires an actual git repo, not -# just an empty tempdir -with_temp_annexes { - my $annex = Git::Annex->new("source1"); - is $annex->{repo}, undef, "Git::Repository instance lazily instantiated"; - ok $annex->repo->isa("Git::Repository") && defined $annex->{repo}, - "Git::Repository instance available"; - is $annex->repo->work_tree, catfile(shift, "source1"), - "Git::Repository has correct toplevel"; -}; +# # lazy init of Git::Repository object requires an actual git repo, not +# # just an empty tempdir +# with_temp_annexes { +# my $annex = Git::Annex->new("source1"); +# is $annex->{repo}, undef, "Git::Repository instance lazily instantiated"; +# ok $annex->repo->isa("Git::Repository") && defined $annex->{repo}, +# "Git::Repository instance available"; +# is $annex->repo->work_tree, catfile(shift, "source1"), +# "Git::Repository has correct toplevel"; +# }; with_temp_annexes { my $source1_dir = catfile shift, "source1"; -- cgit v1.2.3