From 535697fb264705c6a7b291e0b4a2caa630f55d6a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 17 Jul 2016 12:11:05 -0400 Subject: Speed up startup time by caching the refs that have been merged into the git-annex branch. This can speed up git-annex commands by as much as a second, depending on the number of remotes. --- Annex/Locations.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Annex/Locations.hs') diff --git a/Annex/Locations.hs b/Annex/Locations.hs index 9b3856602..058993cd2 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -52,6 +52,7 @@ module Annex.Locations ( gitAnnexIndexStatus, gitAnnexViewIndex, gitAnnexViewLog, + gitAnnexMergedRefs, gitAnnexIgnoredRefs, gitAnnexPidFile, gitAnnexPidLockFile, @@ -357,6 +358,10 @@ gitAnnexViewIndex r = gitAnnexDir r "viewindex" gitAnnexViewLog :: Git.Repo -> FilePath gitAnnexViewLog r = gitAnnexDir r "viewlog" +{- List of refs that have already been merged into the git-annex branch. -} +gitAnnexMergedRefs :: Git.Repo -> FilePath +gitAnnexMergedRefs r = gitAnnexDir r "mergedrefs" + {- List of refs that should not be merged into the git-annex branch. -} gitAnnexIgnoredRefs :: Git.Repo -> FilePath gitAnnexIgnoredRefs r = gitAnnexDir r "ignoredrefs" -- cgit v1.2.3