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.
This commit is contained in:
parent
4226ae1040
commit
42b7ccc89f
4 changed files with 29 additions and 5 deletions
2
Annex.hs
2
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue