Prevent git-ls-files from double-expanding wildcards when an unexpanded wildcard is passed to a git-annex command like add or find.
Note that previously, `git annex find *.jpg` would find eg, foo/bar.jpg. That was never intended or documented behavior, so I'm going to change it. But this is potentially a behavior change if someone discovered that behavior and relied on it despite it being accidental. Oh well.. can't make an omlette w/o breaking some eggs.
This commit is contained in:
parent
cedca095b9
commit
f35d0bf4b2
4 changed files with 30 additions and 1 deletions
|
@ -41,7 +41,7 @@ mkFile :: FilePath -> CommandParam
|
|||
mkFile = File . concatMap go
|
||||
where
|
||||
go c
|
||||
| c == '*' = ['\\', c]
|
||||
| c `elem` "*?[]" = ['\\', c]
|
||||
| otherwise = [c]
|
||||
|
||||
{- Scans for files that are checked into git at the specified locations. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue