stop undoing gitattributes on uninit

v2 upgrade will undo them
This commit is contained in:
Joey Hess 2011-06-22 16:02:43 -04:00
parent 80274f4c92
commit 5c706d1ec4
2 changed files with 48 additions and 11 deletions

View file

@ -34,10 +34,7 @@ start = do
perform :: CommandPerform
perform = do
g <- Annex.gitRepo
gitPreCommitHookUnWrite g
liftIO $ gitAttributesUnWrite g
next $ return True
gitPreCommitHookUnWrite :: Git.Repo -> Annex ()
@ -50,11 +47,3 @@ gitPreCommitHookUnWrite repo = do
else warning $ "pre-commit hook (" ++ hook ++
") contents modified; not deleting." ++
" Edit it to remove call to git annex."
gitAttributesUnWrite :: Git.Repo -> IO ()
gitAttributesUnWrite repo = do
let attributes = Git.attributes repo
whenM (doesFileExist attributes) $ do
c <- readFileStrict attributes
safeWriteFile attributes $ unlines $
filter (\l -> not $ l `elem` Command.Init.attrLines) $ lines c