aboutsummaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-03-29 13:26:06 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-03-29 13:26:06 -0400
commit86c10bc681bb12936bc12c612d6a91096bc41f7b (patch)
tree5291fac68a6e2e505690e33a65a7575d28ee4eb9 /Annex.hs
parentc079545a6a3a85f92fbf592229b5f90dbb2da856 (diff)
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.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs2
1 files changed, 2 insertions, 0 deletions
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.