add: Stage modified non-large files when running in indirect mode.
authorJoey Hess <joeyh@joeyh.name>
Mon, 5 Dec 2016 18:02:11 +0000 (14:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 5 Dec 2016 18:10:21 +0000 (14:10 -0400)
(This was already done in v6 mode and direct mode.)

CHANGELOG
Command/Add.hs

index c30447f4e24da54939d83815d7ff5f3fbce1dfed..8a7c6cce6424482d4f6a3d4453f19fa8a2ee1072 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,8 @@ git-annex (6.20161119) UNRELEASED; urgency=medium
   * fromkey: Accept multiple pairs of files and keys.
     Thanks, Daniel Brooks.
   * rekey: Added --batch mode.
+  * add: Stage modified non-large files when running in indirect mode. 
+    (This was already done in v6 mode and direct mode.)
 
  -- Joey Hess <id@joeyh.name>  Mon, 21 Nov 2016 11:27:50 -0400
 
index eeaaf5d3424070921e280ac287ad37eb0c5f0449..f9cfbb9a144f1bf994a4a47b65894109af6b0b54 100644 (file)
@@ -41,9 +41,6 @@ optParser desc = AddOptions
                )
        <*> parseBatchOption
 
-{- Add acts on both files not checked into git yet, and unlocked files.
- -
- - In direct mode, it acts on any files that have changed. -}
 seek :: AddOptions -> CommandSeek
 seek o = allowConcurrentOutput $ do
        matcher <- largeFilesMatcher
@@ -59,10 +56,9 @@ seek o = allowConcurrentOutput $ do
                NoBatch -> do
                        let go a = a gofile (addThese o)
                        go (withFilesNotInGit (not $ includeDotFiles o))
-                       ifM (versionSupportsUnlockedPointers <||> isDirect)
-                               ( go withFilesMaybeModified
-                               , go withFilesOldUnlocked
-                               )
+                       go withFilesMaybeModified
+                       unlessM (versionSupportsUnlockedPointers <||> isDirect) $
+                               go withFilesOldUnlocked
 
 {- Pass file off to git-add. -}
 startSmall :: FilePath -> CommandStart