Typo: sansative -> sensitive
This commit is contained in:
parent
e018ae1125
commit
0ae5ff797f
9 changed files with 20 additions and 20 deletions
|
@ -111,7 +111,7 @@ parseMetaDataMatcher p = (,)
|
||||||
('>':v) -> checkcmp (>) (>) v
|
('>':v) -> checkcmp (>) (>) v
|
||||||
_ -> checkglob ""
|
_ -> checkglob ""
|
||||||
checkglob v =
|
checkglob v =
|
||||||
let cglob = compileGlob v CaseInsensative (GlobFilePath False)
|
let cglob = compileGlob v CaseInsensitive (GlobFilePath False)
|
||||||
in matchGlob cglob . decodeBS . fromMetaValue
|
in matchGlob cglob . decodeBS . fromMetaValue
|
||||||
checkcmp cmp cmp' v mv' =
|
checkcmp cmp cmp' v mv' =
|
||||||
let v' = decodeBS (fromMetaValue mv')
|
let v' = decodeBS (fromMetaValue mv')
|
||||||
|
|
|
@ -176,7 +176,7 @@ combineViewFilter old@(ExcludeValues olds) (ExcludeValues news)
|
||||||
combineViewFilter (FilterValues _) newglob@(FilterGlob _) =
|
combineViewFilter (FilterValues _) newglob@(FilterGlob _) =
|
||||||
(newglob, Widening)
|
(newglob, Widening)
|
||||||
combineViewFilter (FilterGlob oldglob) new@(FilterValues s)
|
combineViewFilter (FilterGlob oldglob) new@(FilterValues s)
|
||||||
| all (matchGlob (compileGlob oldglob CaseInsensative (GlobFilePath False)) . decodeBS . fromMetaValue) (S.toList s) = (new, Narrowing)
|
| all (matchGlob (compileGlob oldglob CaseInsensitive (GlobFilePath False)) . decodeBS . fromMetaValue) (S.toList s) = (new, Narrowing)
|
||||||
| otherwise = (new, Widening)
|
| otherwise = (new, Widening)
|
||||||
{- With two globs, the old one is discarded, and the new one is used.
|
{- With two globs, the old one is discarded, and the new one is used.
|
||||||
- We can tell if that's a narrowing change by checking if the old
|
- We can tell if that's a narrowing change by checking if the old
|
||||||
|
@ -185,7 +185,7 @@ combineViewFilter (FilterGlob oldglob) new@(FilterValues s)
|
||||||
- widening. -}
|
- widening. -}
|
||||||
combineViewFilter (FilterGlob old) newglob@(FilterGlob new)
|
combineViewFilter (FilterGlob old) newglob@(FilterGlob new)
|
||||||
| old == new = (newglob, Unchanged)
|
| old == new = (newglob, Unchanged)
|
||||||
| matchGlob (compileGlob old CaseInsensative (GlobFilePath False)) new = (newglob, Narrowing)
|
| matchGlob (compileGlob old CaseInsensitive (GlobFilePath False)) new = (newglob, Narrowing)
|
||||||
| otherwise = (newglob, Widening)
|
| otherwise = (newglob, Widening)
|
||||||
{- Combining FilterValuesOrUnset and FilterGlobOrUnset with FilterValues
|
{- Combining FilterValuesOrUnset and FilterGlobOrUnset with FilterValues
|
||||||
- and FilterGlob maintains the OrUnset if the second parameter has it,
|
- and FilterGlob maintains the OrUnset if the second parameter has it,
|
||||||
|
@ -220,7 +220,7 @@ combineViewFilter (FilterGlobOrUnset oldglob _) new@(FilterValuesOrUnset _ _) =
|
||||||
in (new, viewchange)
|
in (new, viewchange)
|
||||||
combineViewFilter (FilterGlobOrUnset old _) newglob@(FilterGlobOrUnset new _)
|
combineViewFilter (FilterGlobOrUnset old _) newglob@(FilterGlobOrUnset new _)
|
||||||
| old == new = (newglob, Unchanged)
|
| old == new = (newglob, Unchanged)
|
||||||
| matchGlob (compileGlob old CaseInsensative (GlobFilePath False)) new = (newglob, Narrowing)
|
| matchGlob (compileGlob old CaseInsensitive (GlobFilePath False)) new = (newglob, Narrowing)
|
||||||
| otherwise = (newglob, Widening)
|
| otherwise = (newglob, Widening)
|
||||||
combineViewFilter (FilterGlob _) newglob@(FilterGlobOrUnset _ _) =
|
combineViewFilter (FilterGlob _) newglob@(FilterGlobOrUnset _ _) =
|
||||||
(newglob, Widening)
|
(newglob, Widening)
|
||||||
|
@ -285,7 +285,7 @@ viewComponentMatcher viewcomponent = \metadata ->
|
||||||
matcher matchunset (FilterValues s) =
|
matcher matchunset (FilterValues s) =
|
||||||
\values -> setmatches matchunset $ S.intersection s values
|
\values -> setmatches matchunset $ S.intersection s values
|
||||||
matcher matchunset (FilterGlob glob) =
|
matcher matchunset (FilterGlob glob) =
|
||||||
let cglob = compileGlob glob CaseInsensative (GlobFilePath False)
|
let cglob = compileGlob glob CaseInsensitive (GlobFilePath False)
|
||||||
in \values -> setmatches matchunset $
|
in \values -> setmatches matchunset $
|
||||||
S.filter (matchGlob cglob . decodeBS . fromMetaValue) values
|
S.filter (matchGlob cglob . decodeBS . fromMetaValue) values
|
||||||
matcher _ (ExcludeValues excludes) =
|
matcher _ (ExcludeValues excludes) =
|
||||||
|
|
|
@ -5117,14 +5117,14 @@ git-annex (5.20140227) unstable; urgency=medium
|
||||||
|
|
||||||
* metadata: Field names limited to alphanumerics and a few whitelisted
|
* metadata: Field names limited to alphanumerics and a few whitelisted
|
||||||
punctuation characters to avoid issues with views, etc.
|
punctuation characters to avoid issues with views, etc.
|
||||||
* metadata: Field names are now case insensative.
|
* metadata: Field names are now case insensitive.
|
||||||
* When constructing views, metadata is available about the location of the
|
* When constructing views, metadata is available about the location of the
|
||||||
file in the view's reference branch. Allows incorporating parts of the
|
file in the view's reference branch. Allows incorporating parts of the
|
||||||
directory hierarchy in a view.
|
directory hierarchy in a view.
|
||||||
For example `git annex view tag=* podcasts/=*` makes a view in the form
|
For example `git annex view tag=* podcasts/=*` makes a view in the form
|
||||||
tag/showname.
|
tag/showname.
|
||||||
* --metadata field=value can now use globs to match, and matches
|
* --metadata field=value can now use globs to match, and matches
|
||||||
case insensatively, the same as git annex view field=value does.
|
case insensitively, the same as git annex view field=value does.
|
||||||
* annex.genmetadata can be set to make git-annex automatically set
|
* annex.genmetadata can be set to make git-annex automatically set
|
||||||
metadata (year and month) when adding files.
|
metadata (year and month) when adding files.
|
||||||
* Make annex.web-options be used in several places that call curl.
|
* Make annex.web-options be used in several places that call curl.
|
||||||
|
|
6
Limit.hs
6
Limit.hs
|
@ -122,7 +122,7 @@ limitExclude glob = Right $ MatchFiles
|
||||||
matchGlobFile :: String -> MatchInfo -> Annex Bool
|
matchGlobFile :: String -> MatchInfo -> Annex Bool
|
||||||
matchGlobFile glob = go
|
matchGlobFile glob = go
|
||||||
where
|
where
|
||||||
cglob = compileGlob glob CaseSensative (GlobFilePath True) -- memoized
|
cglob = compileGlob glob CaseSensitive (GlobFilePath True) -- memoized
|
||||||
go (MatchingFile fi) = pure $ matchGlob cglob (fromRawFilePath (matchFile fi))
|
go (MatchingFile fi) = pure $ matchGlob cglob (fromRawFilePath (matchFile fi))
|
||||||
go (MatchingInfo p) = pure $ case providedFilePath p of
|
go (MatchingInfo p) = pure $ case providedFilePath p of
|
||||||
Just f -> matchGlob cglob (fromRawFilePath f)
|
Just f -> matchGlob cglob (fromRawFilePath f)
|
||||||
|
@ -168,7 +168,7 @@ matchSameContentGlob glob mi = checkKey (go mi) mi
|
||||||
check k . toRawFilePath
|
check k . toRawFilePath
|
||||||
=<< getUserInfo (userProvidedFilePath p)
|
=<< getUserInfo (userProvidedFilePath p)
|
||||||
|
|
||||||
cglob = compileGlob glob CaseSensative (GlobFilePath True) -- memoized
|
cglob = compileGlob glob CaseSensitive (GlobFilePath True) -- memoized
|
||||||
|
|
||||||
matchesglob f = matchGlob cglob (fromRawFilePath f)
|
matchesglob f = matchGlob cglob (fromRawFilePath f)
|
||||||
#ifdef mingw32_HOST_OS
|
#ifdef mingw32_HOST_OS
|
||||||
|
@ -232,7 +232,7 @@ matchMagic _limitname querymagic selectprovidedinfo selectuserprovidedinfo (Just
|
||||||
, matchNeedsLocationLog = False
|
, matchNeedsLocationLog = False
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
cglob = compileGlob glob CaseSensative (GlobFilePath False) -- memoized
|
cglob = compileGlob glob CaseSensitive (GlobFilePath False) -- memoized
|
||||||
go (MatchingFile fi) = catchBoolIO $
|
go (MatchingFile fi) = catchBoolIO $
|
||||||
maybe False (matchGlob cglob)
|
maybe False (matchGlob cglob)
|
||||||
<$> querymagic magic (fromRawFilePath (contentFile fi))
|
<$> querymagic magic (fromRawFilePath (contentFile fi))
|
||||||
|
|
|
@ -202,7 +202,7 @@ mkUrlIncludeExclude = go fallback
|
||||||
|
|
||||||
getglob f pc = do
|
getglob f pc = do
|
||||||
glob <- getRemoteConfigValue f pc
|
glob <- getRemoteConfigValue f pc
|
||||||
Just $ compileGlob glob CaseInsensative (GlobFilePath False)
|
Just $ compileGlob glob CaseInsensitive (GlobFilePath False)
|
||||||
|
|
||||||
mk minclude mexclude = pure $ UrlIncludeExclude
|
mk minclude mexclude = pure $ UrlIncludeExclude
|
||||||
{ checkUrlIncludeExclude = \u -> and
|
{ checkUrlIncludeExclude = \u -> and
|
||||||
|
|
|
@ -22,7 +22,7 @@ data RefSpecPart
|
||||||
| RemoveMatching Glob
|
| RemoveMatching Glob
|
||||||
|
|
||||||
allRefSpec :: RefSpec
|
allRefSpec :: RefSpec
|
||||||
allRefSpec = [AddMatching $ compileGlob "*" CaseSensative (GlobFilePath False)]
|
allRefSpec = [AddMatching $ compileGlob "*" CaseSensitive (GlobFilePath False)]
|
||||||
|
|
||||||
parseRefSpec :: String -> Either String RefSpec
|
parseRefSpec :: String -> Either String RefSpec
|
||||||
parseRefSpec v = case partitionEithers (map mk $ splitc ':' v) of
|
parseRefSpec v = case partitionEithers (map mk $ splitc ':' v) of
|
||||||
|
@ -31,9 +31,9 @@ parseRefSpec v = case partitionEithers (map mk $ splitc ':' v) of
|
||||||
where
|
where
|
||||||
mk ('+':s)
|
mk ('+':s)
|
||||||
| any (`elem` s) "*?" =
|
| any (`elem` s) "*?" =
|
||||||
Right $ AddMatching $ compileGlob s CaseSensative (GlobFilePath False)
|
Right $ AddMatching $ compileGlob s CaseSensitive (GlobFilePath False)
|
||||||
| otherwise = Right $ AddRef $ Ref $ encodeBS s
|
| otherwise = Right $ AddRef $ Ref $ encodeBS s
|
||||||
mk ('-':s) = Right $ RemoveMatching $ compileGlob s CaseSensative (GlobFilePath False)
|
mk ('-':s) = Right $ RemoveMatching $ compileGlob s CaseSensitive (GlobFilePath False)
|
||||||
mk "reflog" = Right AddRefLog
|
mk "reflog" = Right AddRefLog
|
||||||
mk s = Left $ "bad refspec item \"" ++ s ++ "\" (expected + or - prefix)"
|
mk s = Left $ "bad refspec item \"" ++ s ++ "\" (expected + or - prefix)"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import Data.Char
|
||||||
|
|
||||||
newtype Glob = Glob Regex
|
newtype Glob = Glob Regex
|
||||||
|
|
||||||
data GlobCase = CaseSensative | CaseInsensative
|
data GlobCase = CaseSensitive | CaseInsensitive
|
||||||
|
|
||||||
-- Is the glob being used to match filenames?
|
-- Is the glob being used to match filenames?
|
||||||
--
|
--
|
||||||
|
@ -44,8 +44,8 @@ compileGlob glob globcase globfilepath = Glob $
|
||||||
where
|
where
|
||||||
regex = '^' : wildToRegex globfilepath glob ++ "$"
|
regex = '^' : wildToRegex globfilepath glob ++ "$"
|
||||||
casesentitive = case globcase of
|
casesentitive = case globcase of
|
||||||
CaseSensative -> True
|
CaseSensitive -> True
|
||||||
CaseInsensative -> False
|
CaseInsensitive -> False
|
||||||
|
|
||||||
wildToRegex :: GlobFilePath -> String -> String
|
wildToRegex :: GlobFilePath -> String -> String
|
||||||
wildToRegex (GlobFilePath globfile) = concat . go
|
wildToRegex (GlobFilePath globfile) = concat . go
|
||||||
|
|
|
@ -17,8 +17,8 @@ It's actually possible to make brand-new git-annex repos use all lower case
|
||||||
hash directories today, by setting `git config annex.tune.objecthashlower true`
|
hash directories today, by setting `git config annex.tune.objecthashlower true`
|
||||||
before you run `git annex init` for the first time.
|
before you run `git annex init` for the first time.
|
||||||
|
|
||||||
If you know you will need to move a repository between case-insensative and
|
If you know you will need to move a repository between case-insensitive and
|
||||||
case-sensative filesystems, you could use that configuration. But that
|
case-sensitive filesystems, you could use that configuration. But that
|
||||||
would be very forward looking, and instead users are just going to stumble
|
would be very forward looking, and instead users are just going to stumble
|
||||||
over the mixed case directories from time to time.
|
over the mixed case directories from time to time.
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ Possible reasons to make changes:
|
||||||
git-annex checks both locations (eg, a bare repo defaults to xxx/yyy
|
git-annex checks both locations (eg, a bare repo defaults to xxx/yyy
|
||||||
but really old ones might use xX/yY for some keys).
|
but really old ones might use xX/yY for some keys).
|
||||||
|
|
||||||
The mixed case hash directories have caused trouble on case-insensative
|
The mixed case hash directories have caused trouble on case-insensitive
|
||||||
filesystems, although that has mostly been papered over to avoid
|
filesystems, although that has mostly been papered over to avoid
|
||||||
problems. One remaining problem users can stuble on occurs
|
problems. One remaining problem users can stuble on occurs
|
||||||
when [[moving a repository from OSX to Linux|bugs/OSX_case_insensitive_filesystem]].
|
when [[moving a repository from OSX to Linux|bugs/OSX_case_insensitive_filesystem]].
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue