From 86c10bc681bb12936bc12c612d6a91096bc41f7b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Mar 2016 13:26:06 -0400 Subject: git annex add in adjusted unlocked branch Cached the current branch lookup just because it seems unnecessary overhead to run an extra git command per add to query the current branch. --- Annex.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index fe6802776..5ab2b748d 100644 --- a/Annex.hs +++ b/Annex.hs @@ -136,6 +136,7 @@ data AnnexState = AnnexState , workers :: [Either AnnexState (Async AnnexState)] , concurrentjobs :: Maybe Int , keysdbhandle :: Maybe Keys.DbHandle + , cachedcurrentbranch :: Maybe Git.Branch } newState :: GitConfig -> Git.Repo -> AnnexState @@ -182,6 +183,7 @@ newState c r = AnnexState , workers = [] , concurrentjobs = Nothing , keysdbhandle = Nothing + , cachedcurrentbranch = Nothing } {- Makes an Annex state object for the specified git repo. -- cgit v1.2.3