aboutsummaryrefslogtreecommitdiff
path: root/Logs/Location.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-28 17:17:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-28 17:17:26 -0400
commit20a8350e36f6e38b55603e6578fa7b1c4967c1a9 (patch)
tree6c6b884cbc52496d614be996d702e0b8f6dc9300 /Logs/Location.hs
parent6e765717650f0270cdc497d38245bcbc4180e60c (diff)
implement annex.tune.branchhash1
I hope this doesn't impact speed much -- it does have to pull out a value from Annex state every time it accesses the branch now. The test case I dropped has never caught any problems that I can remember, and would have been rather difficult to convert.
Diffstat (limited to 'Logs/Location.hs')
-rw-r--r--Logs/Location.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Logs/Location.hs b/Logs/Location.hs
index d0109b848..7c6888c0b 100644
--- a/Logs/Location.hs
+++ b/Logs/Location.hs
@@ -29,6 +29,7 @@ import Logs
import Logs.Presence
import Annex.UUID
import Git.Types (RefDate)
+import qualified Annex
{- Log a change in the presence of a key's value in current repository. -}
logStatus :: Key -> LogStatus -> Annex ()
@@ -38,7 +39,9 @@ logStatus key s = do
{- Log a change in the presence of a key's value in a repository. -}
logChange :: Key -> UUID -> LogStatus -> Annex ()
-logChange key (UUID u) s = addLog (locationLogFile key) =<< logNow s u
+logChange key (UUID u) s = do
+ config <- Annex.getGitConfig
+ addLog (locationLogFile config key) =<< logNow s u
logChange _ NoUUID _ = noop
{- Returns a list of repository UUIDs that, according to the log, have
@@ -51,7 +54,9 @@ loggedLocationsHistorical :: RefDate -> Key -> Annex [UUID]
loggedLocationsHistorical = getLoggedLocations . historicalLog
getLoggedLocations :: (FilePath -> Annex [String]) -> Key -> Annex [UUID]
-getLoggedLocations getter key = map toUUID <$> (getter . locationLogFile) key
+getLoggedLocations getter key = do
+ config <- Annex.getGitConfig
+ map toUUID <$> (getter . locationLogFile config) key
{- Finds all keys that have location log information.
- (There may be duplicate keys in the list.) -}