summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-03-10 13:09:43 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-03-10 13:09:43 -0700
commitcb1ecb856ab48bbc29a3ad7f2f41f665dd54d592 (patch)
treeff6bc4b5d9323cfe64e6115dc79281b4c56c3afe
parentf1b9bcc7e22c710c7bccf0baa08057cdbd53491b (diff)
downloadp5-Git-Annex-cb1ecb856ab48bbc29a3ad7f2f41f665dd54d592.tar.gz
fix some more paths, passed to --batch commands
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--Changes6
-rw-r--r--lib/App/annex_to_annex.pm5
2 files changed, 9 insertions, 2 deletions
diff --git a/Changes b/Changes
index 5b10f77..ffb86d5 100644
--- a/Changes
+++ b/Changes
@@ -3,6 +3,12 @@ Revision history for Git::Annex
{{$NEXT}}
- annex-to-annex: Fix path passed to git-annex-find(1) when
looking for missing files.
+ - annex-to-annex: Fix path passed to git-annex-lookupkey(1) when
+ determining whether source files are annexed.
+ - annex-to-annex: Pass relative path to git-annex-find(1) when
+ determining if a file was unlocked in the source annex.
+ Workaround for bug in git-annex: git-annex-find(1) returns
+ incorrect response for absolute paths when in --batch mode.
0.002 2020-02-24 07:33:02-07:00 America/Phoenix
- Fix logic in an example in Git::Annex::BatchCommand SYNOPSIS.
diff --git a/lib/App/annex_to_annex.pm b/lib/App/annex_to_annex.pm
index cd054cc..af4346b 100644
--- a/lib/App/annex_to_annex.pm
+++ b/lib/App/annex_to_annex.pm
@@ -130,7 +130,7 @@ sub main {
die "$target already exists!\n"
if -e $target and !-d $target;
- my $key = $lk->ask($rel);
+ my $key = $lk->ask($File::Find::name);
if ($key) { # this is an annexed file
my $content = rel2abs $cl->ask($key), $annex->toplevel;
my $content_device_id = (stat $content)[0];
@@ -147,7 +147,8 @@ sub main {
# to the source, or anything like that
system "git", "-C", $dest, "annex", "add", $rel;
system "git", "-C", $dest, "annex", "unlock", $rel
- if $find->ask($rel);
+ if $find->ask(abs2rel $File::Find::name,
+ $annex->toplevel);
# if using the default backend, quick sanity check
if ($key =~ /^SHA256E-s[0-9]+--([0-9a-f]+)/) {