summaryrefslogtreecommitdiff
path: root/Command/Fsck.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/Fsck.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/Fsck.hs')
-rw-r--r--Command/Fsck.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index bedb9fb99..20ef2c808 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -64,11 +64,11 @@ verifyLocationLog key file = do
case (present, u `elem` uuids) of
(True, False) -> do
- fix g u ValuePresent
+ fix u ValuePresent
-- There is no data loss, so do not fail.
return True
(False, True) -> do
- fix g u ValueMissing
+ fix u ValueMissing
warning $
"** Based on the location log, " ++ file
++ "\n** was expected to be present, " ++
@@ -77,7 +77,6 @@ verifyLocationLog key file = do
_ -> return True
where
- fix g u s = do
+ fix u s = do
showNote "fixing location log"
- _ <- liftIO $ logChange g key u s
- return ()
+ logStatusFor u key s