bugfix: Adding a dotfile also caused all non-dotfiles to be added.
When only a dotfile was specified, the list of non-dotfiles was empty, triggering the fallback behavior of finding all files.
This commit is contained in:
parent
4309f363fb
commit
182778d664
3 changed files with 13 additions and 3 deletions
8
Seek.hs
8
Seek.hs
|
@ -29,12 +29,14 @@ withFilesInGit a params = prepFiltered a $ seekHelper LsFiles.inRepo params
|
||||||
withFilesNotInGit :: (FilePath -> CommandStart) -> CommandSeek
|
withFilesNotInGit :: (FilePath -> CommandStart) -> CommandSeek
|
||||||
withFilesNotInGit a params = do
|
withFilesNotInGit a params = do
|
||||||
{- dotfiles are not acted on unless explicitly listed -}
|
{- dotfiles are not acted on unless explicitly listed -}
|
||||||
files <- filter (not . dotfile) <$> seek ps
|
files <- filter (not . dotfile) <$>
|
||||||
dotfiles <- if null dotps then return [] else seek dotps
|
seekunless (null ps && not (null params)) ps
|
||||||
|
dotfiles <- seekunless (null dotps) dotps
|
||||||
prepFiltered a $ return $ preserveOrder params (files++dotfiles)
|
prepFiltered a $ return $ preserveOrder params (files++dotfiles)
|
||||||
where
|
where
|
||||||
(dotps, ps) = partition dotfile params
|
(dotps, ps) = partition dotfile params
|
||||||
seek l = do
|
seekunless True _ = return []
|
||||||
|
seekunless _ l = do
|
||||||
force <- Annex.getState Annex.force
|
force <- Annex.getState Annex.force
|
||||||
g <- gitRepo
|
g <- gitRepo
|
||||||
liftIO $ (\p -> LsFiles.notInRepo force p g) l
|
liftIO $ (\p -> LsFiles.notInRepo force p g) l
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
git-annex (3.20120407) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* bugfix: Adding a dotfile also caused all non-dotfiles to be added.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Sun, 08 Apr 2012 12:23:42 -0400
|
||||||
|
|
||||||
git-annex (3.20120406) unstable; urgency=low
|
git-annex (3.20120406) unstable; urgency=low
|
||||||
|
|
||||||
* Disable diskfree on kfreebsd, as I have a build failure on kfreebsd-i386
|
* Disable diskfree on kfreebsd, as I have a build failure on kfreebsd-i386
|
||||||
|
|
|
@ -21,3 +21,5 @@ What version of git-annex are you using? On what operating system?
|
||||||
|
|
||||||
3.20120406
|
3.20120406
|
||||||
(same problem with version 3.20120123) on Debian.
|
(same problem with version 3.20120123) on Debian.
|
||||||
|
|
||||||
|
> Thanks for reporting this bug, I've fixed it in git. [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue