From ba0c2df69afc23bfb8d2f02ca390e24d3065f2dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 30 Mar 2015 19:44:13 -0400 Subject: 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. --- Annex/Fixup.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Annex') diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs index bb35454ee..07caa44df 100644 --- a/Annex/Fixup.hs +++ b/Annex/Fixup.hs @@ -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 -- cgit v1.2.3