summaryrefslogtreecommitdiff
path: root/Command/Move.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-04-25 14:54:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-04-25 14:54:24 -0400
commit76911a446a7156ffb23679c6325fa8aab1edce13 (patch)
tree8b4915fe5d33a7df38275afc58161102b5033fd7 /Command/Move.hs
parente433c6f0bb2ee5f03217b85e3b677b961f5d391a (diff)
Avoid using absolute paths when staging location log, as that can confuse git when a remote's path contains a symlink. Closes: #621386
This was a real PITA to fix, since location logs can be staged in both the current repo, as well as in local remote's repos, in which case the cwd will not be in the repo. And git add needs different params in both cases, when absolute paths are not used. In passing, git annex fsck now stages location log fixes.
Diffstat (limited to 'Command/Move.hs')
-rw-r--r--Command/Move.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/Command/Move.hs b/Command/Move.hs
index e5e78d249..476bf866a 100644
--- a/Command/Move.hs
+++ b/Command/Move.hs
@@ -7,19 +7,15 @@
module Command.Move where
-import Control.Monad.State (liftIO)
-
import Command
import qualified Command.Drop
import qualified Annex
-import qualified AnnexQueue
import LocationLog
import Types
import Content
import qualified Remote
import UUID
import Messages
-import Utility
command :: [Command]
command = [repoCommand "move" paramPath seek
@@ -57,10 +53,8 @@ showAction False file = showStart "copy" file
- for bare repos. -}
remoteHasKey :: Remote.Remote Annex -> Key -> Bool -> Annex ()
remoteHasKey remote key present = do
- g <- Annex.gitRepo
let remoteuuid = Remote.uuid remote
- logfile <- liftIO $ logChange g key remoteuuid status
- AnnexQueue.add "add" [Param "--"] logfile
+ logStatusFor remoteuuid key status
where
status = if present then ValuePresent else ValueMissing