diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-01 23:46:21 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-01 23:46:21 -0700 |
commit | 1762ef5b20efac627e0926605e3075b9fb173782 (patch) | |
tree | 9459018b12c7f4759612a0dcc377070a89bcf67e /lib | |
parent | 3c55ed2145a513bc3b2a110b6548b1cf7a193b7f (diff) | |
download | p5-Git-Annex-1762ef5b20efac627e0926605e3075b9fb173782.tar.gz |
ensure that Git::Annex toplevel is always an absolute path
Avoids some problems with Git::Wrapper, which does not cope when the
pwd changes but Git::Wrapper was initialised with a path relative to
the old pwd.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Git/Annex.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm index 3819b09..19e818a 100644 --- a/lib/Git/Annex.pm +++ b/lib/Git/Annex.pm @@ -258,7 +258,7 @@ sub _git_path { around BUILDARGS => sub { my (undef, undef, @args) = @_; - { toplevel => $args[0] // getcwd }; + { toplevel => $args[0] ? rel2abs($args[0]) : getcwd }; }; 1; |