summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-05 14:02:11 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-05 14:10:21 -0400
commitad966cbd942d621e7dfe1def47de6809ca719504 (patch)
tree9a2489881460d18a85d8709592b5031a147692b9 /Command/Add.hs
parent6010d99a326e393266e98c25ca942c54badac7a8 (diff)
add: Stage modified non-large files when running in indirect mode.
(This was already done in v6 mode and direct mode.)
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index eeaaf5d34..f9cfbb9a1 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -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