diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index c2ba90ebe4..89cef6ea76 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -184,8 +184,11 @@ onAdd matcher file filestatus | otherwise = noChange {- In direct mode, add events are received for both new files, and - - modified existing files. Or, in some cases, existing files that have not - - really been modified. -} + - modified existing files. + - + - It's possible to get an add event for an existing file that is not + - really modified, but it might have just been deleted and been put back, + - so it's restaged to make sure. -} onAddDirect :: FileMatcher -> Handler onAddDirect matcher file fs = do debug ["add direct", file] @@ -193,7 +196,7 @@ onAddDirect matcher file fs = do case (v, fs) of (Just key, Just filestatus) -> ifM (liftAnnex $ sameFileStatus key filestatus) - ( noChange + ( add matcher file , do liftAnnex $ changedDirect key file add matcher file diff --git a/debian/changelog b/debian/changelog index 763e3577f9..dc602e9e2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ git-annex (4.20130324) UNRELEASED; urgency=low and unwanted repositories. * drop --auto: Fix bug that prevented dropping files from untrusted repositories. + * assistant: Fix bug that could cause direct mode files to be unstaged + from git. -- Joey Hess Mon, 25 Mar 2013 10:21:46 -0400