bugfix: Running move --to with a remote whose UUID was not yet known

* bugfix: Running `move --to` with a remote whose UUID was not yet known
  could result in git-annex not recording on the local side where the
  file was moved to. This could not result in data loss, or even a
  significant problem, since the remote *did* record that it had the file.
* Also, add a general guard to detect attempts to record information
  about repositories with missing UUIDs.
This commit is contained in:
Joey Hess 2011-01-04 17:45:27 -04:00
parent a857e1f4ee
commit f1b747e6d9
3 changed files with 8 additions and 1 deletions

View file

@ -75,6 +75,7 @@ toStart move file = isAnnexed file $ \(key, _) -> do
return $ Just $ toPerform move key
toPerform :: Bool -> Key -> CommandPerform
toPerform move key = do
Remotes.readConfigs
-- checking the remote is expensive, so not done in the start step
remote <- Remotes.commandLineRemote
isthere <- Remotes.inAnnex remote key

View file

@ -7,8 +7,8 @@
module Remotes (
list,
readConfigs,
keyPossibilities,
tryGitConfigRead,
inAnnex,
same,
commandLineRemote,

6
debian/changelog vendored
View file

@ -2,6 +2,12 @@ git-annex (0.16) UNRELEASED; urgency=low
* git-annex-shell: Avoid exposing any git repo config except for the
annex.uuid when doing configlist.
* bugfix: Running `move --to` with a remote whose UUID was not yet known
could result in git-annex not recording on the local side where the
file was moved to. This could not result in data loss, or even a
significant problem, since the remote *did* record that it had the file.
* Also, add a general guard to detect attempts to record information
about repositories with missing UUIDs.
-- Joey Hess <joeyh@debian.org> Tue, 04 Jan 2011 17:33:42 -0400