when annex.largefiles parse fails, say where the config came from
This commit is contained in:
parent
945be47b48
commit
8e9e809d9b
1 changed files with 6 additions and 6 deletions
|
@ -210,21 +210,21 @@ largeFilesMatcher :: Annex GetFileMatcher
|
||||||
largeFilesMatcher = go =<< getGitConfigVal' annexLargeFiles
|
largeFilesMatcher = go =<< getGitConfigVal' annexLargeFiles
|
||||||
where
|
where
|
||||||
go (HasGitConfig (Just expr)) = do
|
go (HasGitConfig (Just expr)) = do
|
||||||
matcher <- mkmatcher expr
|
matcher <- mkmatcher expr "git config"
|
||||||
return $ const $ return matcher
|
return $ const $ return matcher
|
||||||
go v = return $ \file -> do
|
go v = return $ \file -> do
|
||||||
expr <- checkAttr "annex.largefiles" file
|
expr <- checkAttr "annex.largefiles" file
|
||||||
if null expr || expr == unspecifiedAttr
|
if null expr || expr == unspecifiedAttr
|
||||||
then case v of
|
then case v of
|
||||||
HasGlobalConfig (Just expr') ->
|
HasGlobalConfig (Just expr') ->
|
||||||
mkmatcher expr'
|
mkmatcher expr' "git-annex config"
|
||||||
_ -> return matchAll
|
_ -> return matchAll
|
||||||
else mkmatcher expr
|
else mkmatcher expr "gitattributes"
|
||||||
|
|
||||||
mkmatcher expr = do
|
mkmatcher expr cfgfrom = do
|
||||||
parser <- mkLargeFilesParser
|
parser <- mkLargeFilesParser
|
||||||
either badexpr return $ parsedToMatcher $ parser expr
|
either (badexpr cfgfrom) return $ parsedToMatcher $ parser expr
|
||||||
badexpr e = giveup $ "bad annex.largefiles configuration: " ++ e
|
badexpr cfgfrom e = giveup $ "bad annex.largefiles configuration in " ++ cfgfrom ++ ": " ++ e
|
||||||
|
|
||||||
simply :: MatchFiles Annex -> ParseResult (MatchFiles Annex)
|
simply :: MatchFiles Annex -> ParseResult (MatchFiles Annex)
|
||||||
simply = Right . Operation
|
simply = Right . Operation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue