Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.
The environment needs to override git-config. Changed when git config is read, and avoid rereading it once it's been read. chdir for both worktree settings.
This commit is contained in:
parent
bb4f31a0ee
commit
eb6cb1b87f
10 changed files with 79 additions and 44 deletions
4
test.hs
4
test.hs
|
@ -26,7 +26,7 @@ import qualified Annex
|
|||
import qualified Annex.UUID
|
||||
import qualified Backend
|
||||
import qualified Git.Config
|
||||
import qualified Git.Construct
|
||||
import qualified Git.CurrentRepo
|
||||
import qualified Git.Filename
|
||||
import qualified Locations
|
||||
import qualified Types.Backend
|
||||
|
@ -721,7 +721,7 @@ git_annex_expectoutput command params expected = do
|
|||
-- are not run; this should only be used for actions that query state.
|
||||
annexeval :: Types.Annex a -> IO a
|
||||
annexeval a = do
|
||||
s <- Annex.new =<< Git.Config.read =<< Git.Construct.fromCurrent
|
||||
s <- Annex.new =<< Git.CurrentRepo.get
|
||||
Annex.eval s $ do
|
||||
Annex.setOutput Types.Messages.QuietOutput
|
||||
a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue