pass -c option on to all git commands run

The -c option now not only modifies the git configuration seen by
git-annex, but it is passed along to every git command git-annex runs.

This was easy to plumb through because gitCommandLine is already used to
construct every git command line, to add --git-dir and --work-tree
This commit is contained in:
Joey Hess 2013-11-05 13:38:37 -04:00
parent 2eeb54a107
commit c2862d9585
5 changed files with 13 additions and 3 deletions

View file

@ -21,7 +21,8 @@ import Git.FilePath
{- Constructs a git command line operating on the specified repo. -}
gitCommandLine :: [CommandParam] -> Repo -> [CommandParam]
gitCommandLine params Repo { location = l@(Local _ _ ) } = setdir : settree ++ params
gitCommandLine params r@(Repo { location = l@(Local _ _ ) }) =
setdir : settree ++ gitGlobalOpts r ++ params
where
setdir = Param $ "--git-dir=" ++ gitpath (gitdir l)
settree = case worktree l of