avoid withWorkTreeRelated affecting annex symlink calculation
This commit is contained in:
parent
f41045bf19
commit
251405eca2
5 changed files with 13 additions and 9 deletions
|
@ -17,9 +17,11 @@ import qualified Utility.CoProcess as CoProcess
|
|||
{- Constructs a git command line operating on the specified repo. -}
|
||||
gitCommandLine :: [CommandParam] -> Repo -> [CommandParam]
|
||||
gitCommandLine params r@(Repo { location = l@(Local { } ) }) =
|
||||
setdir : settree ++ gitGlobalOpts r ++ params
|
||||
setdir ++ settree ++ gitGlobalOpts r ++ params
|
||||
where
|
||||
setdir = Param $ "--git-dir=" ++ gitdir l
|
||||
setdir
|
||||
| gitEnvOverridesGitDir r = []
|
||||
| otherwise = [Param $ "--git-dir=" ++ gitdir l]
|
||||
settree = case worktree l of
|
||||
Nothing -> []
|
||||
Just t -> [Param $ "--work-tree=" ++ t]
|
||||
|
|
|
@ -236,6 +236,7 @@ newFrom l = Repo
|
|||
, remotes = []
|
||||
, remoteName = Nothing
|
||||
, gitEnv = Nothing
|
||||
, gitEnvOverridesGitDir = False
|
||||
, gitGlobalOpts = []
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ data Repo = Repo
|
|||
, remoteName :: Maybe RemoteName
|
||||
-- alternate environment to use when running git commands
|
||||
, gitEnv :: Maybe [(String, String)]
|
||||
, gitEnvOverridesGitDir :: Bool
|
||||
-- global options to pass to git when running git commands
|
||||
, gitGlobalOpts :: [CommandParam]
|
||||
} deriving (Show, Eq, Ord)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue