diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-06-12 17:09:09 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-06-13 13:54:14 +0100 |
commit | 694dd8b98f1a453f76f0e7d8eee874a8f5a5a0f1 (patch) | |
tree | 662f6db4535cce3e82341c319de0508e0412c150 /perl5 | |
parent | cde6c55e427ca03513399e333ff742bab67ed9f1 (diff) | |
download | dotfiles-694dd8b98f1a453f76f0e7d8eee874a8f5a5a0f1.tar.gz |
configure annex.used-refspec for move-extdrive-unused annexes
These repositories have just one ordinary branch, so "+refs/heads/master"
should be exactly equivalent to "+refs/heads/*:-refs/heads/synced/*".
Diffstat (limited to 'perl5')
-rw-r--r-- | perl5/Local/MrRepo/Repo/Git/Annex.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/perl5/Local/MrRepo/Repo/Git/Annex.pm b/perl5/Local/MrRepo/Repo/Git/Annex.pm index 862397f8..17769514 100644 --- a/perl5/Local/MrRepo/Repo/Git/Annex.pm +++ b/perl5/Local/MrRepo/Repo/Git/Annex.pm @@ -67,17 +67,15 @@ sub review { # 2. Pull in unused files on external drives before we review. # This reduces the number of times we might have to review these # particular unused files. + # + # This relies on annex.used-refspec being set to something sensible for + # the repository, and usually also that 'mr update' has done 'ga merge'. if ($self->config_bool("spwhitton.mrrepo.move-extdrive-unused", "false")) { foreach my $remote ($self->git->remote) { my ($url) = $self->git->remote("get-url", $remote); $url =~ m#\A/media/# and -d $url or next; - $self->git->annex( - "unused", - { - used_refspec => "+refs/heads/*:-refs/heads/synced/*", - from => $remote - }); + $self->git->annex("unused", { from => $remote }); system qw(git -C), $self->toplevel, qw(annex move --unused --numcopies=1), "--from=$remote"; # TODO Empty .git/annex/tmp/ on the external drive? |