aboutsummaryrefslogtreecommitdiff
path: root/Command/Unannex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-15 16:18:39 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-15 16:18:39 -0400
commit49983aafdc36f21aee6aef9a540ac93d7171ab69 (patch)
tree23310d6954812027cd3ebc93318a811fbdca9fa4 /Command/Unannex.hs
parent2a9c5f62e3e2676922905f09b1f2ca535354d884 (diff)
in v6 mode, unannex does not interact badly with pre-commit hook
So can be used in a tree with staged changes, no problems. Much nicer.
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r--Command/Unannex.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs
index fdf976d3e..f7af8cde6 100644
--- a/Command/Unannex.hs
+++ b/Command/Unannex.hs
@@ -15,6 +15,7 @@ import Config
import qualified Annex
import Annex.Content
import Annex.Content.Direct
+import Annex.Version
import qualified Git.Command
import qualified Git.Branch
import qualified Git.Ref
@@ -32,7 +33,7 @@ seek :: CmdParams -> CommandSeek
seek = wrapUnannex . (withFilesInGit $ whenAnnexed start)
wrapUnannex :: Annex a -> Annex a
-wrapUnannex a = ifM isDirect
+wrapUnannex a = ifM (versionSupportsUnlockedPointers <||> isDirect)
( a
{- Run with the pre-commit hook disabled, to avoid confusing
- behavior if an unannexed file is added back to git as