summaryrefslogtreecommitdiff
path: root/Annex/Fixup.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Fixup.hs')
-rw-r--r--Annex/Fixup.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs
index 99b4ea2d5..4d9afea91 100644
--- a/Annex/Fixup.hs
+++ b/Annex/Fixup.hs
@@ -11,6 +11,7 @@ import Git.Types
import Git.Config
import Types.GitConfig
import qualified Git.Construct as Construct
+import qualified Git.BuildVersion
import Utility.Path
import Utility.SafeCommand
import Utility.Directory
@@ -36,8 +37,10 @@ fixupRepo r c = do
{- Disable git's built-in wildcard expansion, which is not wanted
- when using it as plumbing by git-annex. -}
disableWildcardExpansion :: Repo -> Repo
-disableWildcardExpansion r = r
- { gitGlobalOpts = gitGlobalOpts r ++ [Param "--literal-pathspecs"] }
+disableWildcardExpansion r
+ | Git.BuildVersion.older "1.8.1" = r
+ | otherwise = r
+ { gitGlobalOpts = gitGlobalOpts r ++ [Param "--literal-pathspecs"] }
{- 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