use --literal-pathspecs globally, as a better way to avoid globbing

This might be overkill; I only know I need it in ls-files, but other git
commands can also do their own globbing, it turns out, and I am pretty sure
I never want them too when git-annex is using them as plumbing.

Test suite still passes and it looks ok.
This commit is contained in:
Joey Hess 2015-03-30 19:44:13 -04:00
parent f4ad6ad872
commit 15d45186cc
2 changed files with 14 additions and 34 deletions

View file

@ -27,10 +27,11 @@ import qualified Data.Map as M
fixupRepo :: Repo -> GitConfig -> IO Repo
fixupRepo r c = do
r' <- fixupSubmodule r c
let r' = r { gitGlobalOpts = gitGlobalOpts r ++ [Param "--literal-pathspecs"] }
r'' <- fixupSubmodule r' c
if annexDirect c
then fixupDirect r'
else return r'
then fixupDirect r''
else return r''
{- Direct mode repos have core.bare=true, but are not really bare.
- Fix up the Repo to be a non-bare repo, and arrange for git commands