From b9588fe69e1dfd8e8230bb3a7bc9f28e21c33326 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Dec 2015 16:18:39 -0400 Subject: [PATCH] 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. --- Command/Unannex.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Command/Unannex.hs b/Command/Unannex.hs index fdf976d3e0..f7af8cde63 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 -- 2.30.2