aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-02 15:41:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-02 15:41:20 -0400
commit7a3aafe76274a9e54395acb8ec2ce351888495de (patch)
treeae6a865351bc5ead9139b209ad7606b26ad73a34
parent1218c7b96704ecf0b4564d19bab2d04f7e539070 (diff)
copy --from, get --from: When --force is used, ignore the location log and always try to get the file from the remote.
-rw-r--r--Command/Move.hs11
-rw-r--r--debian/changelog2
-rw-r--r--doc/git-annex.mdwn6
3 files changed, 14 insertions, 5 deletions
diff --git a/Command/Move.hs b/Command/Move.hs
index dc501ae0f..7d11b5abd 100644
--- a/Command/Move.hs
+++ b/Command/Move.hs
@@ -133,11 +133,14 @@ fromStart src move afile key
next $ fromPerform src move key afile
fromOk :: Remote -> Key -> Annex Bool
-fromOk src key
- | Remote.hasKeyCheap src =
- either (const expensive) return =<< Remote.hasKey src key
- | otherwise = expensive
+fromOk src key = go =<< Annex.getState Annex.force
where
+ go True = either (const $ return True) return =<< haskey
+ go False
+ | Remote.hasKeyCheap src =
+ either (const expensive) return =<< haskey
+ | otherwise = expensive
+ haskey = Remote.hasKey src key
expensive = do
u <- getUUID
remotes <- Remote.keyPossibilities key
diff --git a/debian/changelog b/debian/changelog
index 8aa16d6a5..19e4cd9ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ git-annex (5.20131131) UNRELEASED; urgency=low
versions 5.20131118 through 5.20131127.
* rsync special remote: Fix fallback mode for rsync remotes that
use hashDirMixed. Closes: #731142
+ * copy --from, get --from: When --force is used, ignore the
+ location log and always try to get the file from the remote.
-- Joey Hess <joeyh@debian.org> Sun, 01 Dec 2013 13:57:58 -0400
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 25e1045db..69ea6191d 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -101,7 +101,11 @@ subdirectories).
When used with the `--to` option, copies the content of annexed files from
the current repository to the specified one.
- To avoid contacting the remote to check if it has every file, specify `--fast`
+ To avoid contacting the remote to check if it has every file
+ when copying --to the repository, specify `--fast`
+
+ To force checking the remote for every file when copying --from the
+ repository, specify `--force`.
* `status` [path ...]`