summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib-src/git/annex2
-rw-r--r--lib-src/git/lib/annex2
-rw-r--r--lib-src/git/lib/wikiannex3
-rw-r--r--lib-src/git/src/athpriv1
-rw-r--r--perl5/Local/MrRepo/Repo/Git/Annex.pm10
5 files changed, 12 insertions, 6 deletions
diff --git a/lib-src/git/annex b/lib-src/git/annex
index d5ce3f39..f84abe86 100644
--- a/lib-src/git/annex
+++ b/lib-src/git/annex
@@ -6,6 +6,8 @@
startupscan = false
+ used-refspec = +refs/heads/master
+
[push]
default = nothing
diff --git a/lib-src/git/lib/annex b/lib-src/git/lib/annex
index a26012cd..90a5c549 100644
--- a/lib-src/git/lib/annex
+++ b/lib-src/git/lib/annex
@@ -6,6 +6,8 @@
startupscan = false
+ used-refspec = +refs/heads/master
+
[push]
default = matching
diff --git a/lib-src/git/lib/wikiannex b/lib-src/git/lib/wikiannex
index 61143d19..98df8404 100644
--- a/lib-src/git/lib/wikiannex
+++ b/lib-src/git/lib/wikiannex
@@ -1,5 +1,8 @@
# -*- conf -*-
+[annex]
+ used-refspec = +refs/heads/master
+
[remote "origin"]
annex-ignore = true
diff --git a/lib-src/git/src/athpriv b/lib-src/git/src/athpriv
index ee577648..1a052d51 100644
--- a/lib-src/git/src/athpriv
+++ b/lib-src/git/src/athpriv
@@ -4,6 +4,7 @@
addunlocked = true
largefiles = include=*.SCORE or include=*.ADAPT
synconlyannex = true
+ used-refspec = +refs/heads/master
[branch "master"]
rebase = false
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?