Windows: include= and exclude= containing '/' will also match filenames that are written using '\'
And vice-versa, but it's better to use '/' for portability. Notably, standardPreferredContent contains "archive/*" and that might not match if the filename ends up coming in with the slashes the other way around.
This commit is contained in:
parent
e914cb0777
commit
6b13574827
7 changed files with 49 additions and 17 deletions
|
@ -22,7 +22,7 @@ data RefSpecPart
|
|||
| RemoveMatching Glob
|
||||
|
||||
allRefSpec :: RefSpec
|
||||
allRefSpec = [AddMatching $ compileGlob "*" CaseSensative]
|
||||
allRefSpec = [AddMatching $ compileGlob "*" CaseSensative (GlobFilePath False)]
|
||||
|
||||
parseRefSpec :: String -> Either String RefSpec
|
||||
parseRefSpec v = case partitionEithers (map mk $ splitc ':' v) of
|
||||
|
@ -31,9 +31,9 @@ parseRefSpec v = case partitionEithers (map mk $ splitc ':' v) of
|
|||
where
|
||||
mk ('+':s)
|
||||
| any (`elem` s) "*?" =
|
||||
Right $ AddMatching $ compileGlob s CaseSensative
|
||||
Right $ AddMatching $ compileGlob s CaseSensative (GlobFilePath False)
|
||||
| otherwise = Right $ AddRef $ Ref $ encodeBS s
|
||||
mk ('-':s) = Right $ RemoveMatching $ compileGlob s CaseSensative
|
||||
mk ('-':s) = Right $ RemoveMatching $ compileGlob s CaseSensative (GlobFilePath False)
|
||||
mk "reflog" = Right AddRefLog
|
||||
mk s = Left $ "bad refspec item \"" ++ s ++ "\" (expected + or - prefix)"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue