summaryrefslogtreecommitdiff
path: root/Command/Unannex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r--Command/Unannex.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs
index bf931adfd..67d81bec0 100644
--- a/Command/Unannex.hs
+++ b/Command/Unannex.hs
@@ -39,12 +39,14 @@ cleanup file key = do
-- Commit that removal now, to avoid later confusing the
-- pre-commit hook if this file is later added back to
-- git as a normal, non-annexed file.
- whenM (not . null <$> inRepo (LsFiles.staged [file])) $ do
+ (s, clean) <- inRepo $ LsFiles.staged [file]
+ when (not $ null s) $ do
showOutput
inRepo $ Git.Command.run "commit" [
Param "-q",
Params "-m", Param "content removed from git annex",
Param "--", File file]
+ void $ liftIO clean
ifM (Annex.getState Annex.fast)
( do