summaryrefslogtreecommitdiff
path: root/Command/Unannex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-01 21:26:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-01 21:27:23 -0400
commitc77ac11acc10efc23acfa3d81e1deaac11cb724f (patch)
tree5d0d2b59b3a775f882e51625d64eadb804d696be /Command/Unannex.hs
parent9aecf4110afb2fb1f6b10a9a9234ad0afafda56e (diff)
unannex: Commit staged changes at end
to avoid some confusing behavior with the pre-commit hook, which would see some types of commits after an unannex as checking in of an unlocked file.
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r--Command/Unannex.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs
index 413443969..3810cca1c 100644
--- a/Command/Unannex.hs
+++ b/Command/Unannex.hs
@@ -55,5 +55,10 @@ cleanup file key = do
fromAnnex key file
logStatus key ValueMissing
-
+
+ -- Commit staged changes at end to avoid confusing the
+ -- pre-commit hook if this file is later added back to
+ -- git as a normal, non-annexed file.
+ Annex.queue "commit" ["-m", "content removed from git annex"] "--"
+
return True