summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-03 15:06:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-03 15:06:58 -0400
commit01111895034873f6b65fcd2ebb86a95de4e6a9e8 (patch)
tree8ce15b744f34138dc2b4e11aea70591cf8b082de /Annex
parent753e26e5e39b0038a634cfc529e6e634f6ca9035 (diff)
rename confusing function
The index.lck file is not a lock file. Kept the historical name for now as changing it would be work.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Branch.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index a3cb8aa72..8c8aef7d6 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -351,18 +351,18 @@ forceUpdateIndex branchref = do
{- Checks if the index needs to be updated. -}
needUpdateIndex :: Git.Ref -> Annex Bool
needUpdateIndex branchref = do
- lock <- fromRepo gitAnnexIndexLock
- lockref <- Git.Ref . firstLine <$>
- liftIO (catchDefaultIO "" $ readFileStrict lock)
- return (lockref /= branchref)
+ f <- fromRepo gitAnnexIndexStatus
+ committedref <- Git.Ref . firstLine <$>
+ liftIO (catchDefaultIO "" $ readFileStrict f)
+ return (committedref /= branchref)
{- Record that the branch's index has been updated to correspond to a
- given ref of the branch. -}
setIndexSha :: Git.Ref -> Annex ()
setIndexSha ref = do
- lock <- fromRepo gitAnnexIndexLock
- liftIO $ writeFile lock $ show ref ++ "\n"
- setAnnexPerm lock
+ f <- fromRepo gitAnnexIndexStatus
+ liftIO $ writeFile f $ show ref ++ "\n"
+ setAnnexPerm f
{- Stages the journal into the index and returns an action that will
- clean up the staged journal files, which should only be run once