diff options
author | 2013-10-28 13:46:21 -0400 | |
---|---|---|
committer | 2013-10-28 13:46:26 -0400 | |
commit | c9031fc4831e1d22b120a73447486e3dad777b69 (patch) | |
tree | 517c6f7d049ba6ee2539031d1de8cb1a81594220 /Seek.hs | |
parent | ecfe9e278692a24ad9a8fb71d3e013ca01903641 (diff) |
add: Fix reversion in 4.20130827 when adding unlocked files that have not yet been committed.
catKeyFileHEAD is still checked too, because when doing a git commit with
unlocked files, the file gets staged to the index, so is not typechanged
there.
(This is also why git annex add foo; git annex unlock foo; git commit -a
does not re-annex foo, because there is no indication left that it was
added.)
Diffstat (limited to 'Seek.hs')
-rw-r--r-- | Seek.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -96,7 +96,8 @@ withFilesUnlockedToBeCommitted = withFilesUnlocked' LsFiles.typeChangedStaged withFilesUnlocked' :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> (FilePath -> CommandStart) -> CommandSeek withFilesUnlocked' typechanged a params = prepFiltered a unlockedfiles where - check f = liftIO (notSymlink f) <&&> isJust <$> catKeyFileHEAD f + check f = liftIO (notSymlink f) <&&> + (isJust <$> catKeyFile f <||> isJust <$> catKeyFileHEAD f) unlockedfiles = filterM check =<< seekHelper typechanged params {- Finds files that may be modified. -} |