don't try to remove pre-commit-annex and post-update-annex-hooks
Those are not installed by git-annex but by the user, and so removal will never find the default content, and so if the user did install them, it would display a misleading message. Seems better, since the user installed them, to let the user remove them if they want to.
This commit is contained in:
parent
b2c5c99506
commit
c3e5417c17
2 changed files with 5 additions and 11 deletions
|
@ -18,16 +18,6 @@ import Utility.Shell
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
||||||
-- Remove all hooks.
|
|
||||||
unHook :: Annex ()
|
|
||||||
unHook = do
|
|
||||||
hookUnWrite preCommitHook
|
|
||||||
hookUnWrite postReceiveHook
|
|
||||||
hookUnWrite postCheckoutHook
|
|
||||||
hookUnWrite postMergeHook
|
|
||||||
hookUnWrite preCommitAnnexHook
|
|
||||||
hookUnWrite postUpdateAnnexHook
|
|
||||||
|
|
||||||
preCommitHook :: Git.Hook
|
preCommitHook :: Git.Hook
|
||||||
preCommitHook = Git.Hook "pre-commit" (mkHookScript "git annex pre-commit .") []
|
preCommitHook = Git.Hook "pre-commit" (mkHookScript "git annex pre-commit .") []
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,11 @@ initialize' mversion = checkCanInitialize $ do
|
||||||
|
|
||||||
uninitialize :: Annex ()
|
uninitialize :: Annex ()
|
||||||
uninitialize = do
|
uninitialize = do
|
||||||
unHook
|
-- Remove hooks that are written when initializing.
|
||||||
|
hookUnWrite preCommitHook
|
||||||
|
hookUnWrite postReceiveHook
|
||||||
|
hookUnWrite postCheckoutHook
|
||||||
|
hookUnWrite postMergeHook
|
||||||
deconfigureSmudgeFilter
|
deconfigureSmudgeFilter
|
||||||
removeRepoUUID
|
removeRepoUUID
|
||||||
removeVersion
|
removeVersion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue