From 5c63b409d4b046f2179ae3c542bfd47d86c8c90c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jul 2011 15:50:30 -0400 Subject: [PATCH] uninit: Delete the git-annex branch. --- Command/Uninit.hs | 17 ++++++++++++----- debian/changelog | 6 ++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Command/Uninit.hs b/Command/Uninit.hs index c47ac0c3af..22006f7dcd 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -9,6 +9,7 @@ module Command.Uninit where import Control.Monad.State (liftIO) import System.Directory +import System.Exit import Command import Messages @@ -18,6 +19,8 @@ import qualified Git import qualified Annex import qualified Command.Unannex import qualified Command.Init +import qualified Branch +import Content command :: [Command] command = [repoCommand "uninit" paramPath seek @@ -27,15 +30,19 @@ seek :: [CommandSeek] seek = [withFilesInGit Command.Unannex.start, withNothing start] start :: CommandStartNothing -start = do - showStart "uninit" "" - next perform +start = next perform perform :: CommandPerform -perform = do +perform = next cleanup + +cleanup :: CommandCleanup +cleanup = do g <- Annex.gitRepo gitPreCommitHookUnWrite g - next $ return True + saveState + liftIO $ Git.run g "branch" [Param "-D", Param Branch.name] + -- bypass normal shutdown, which writes to the deleted branch + liftIO exitSuccess gitPreCommitHookUnWrite :: Git.Repo -> Annex () gitPreCommitHookUnWrite repo = do diff --git a/debian/changelog b/debian/changelog index 266a747ee0..fb5b80ac0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (3.20110703) UNRELEASED; urgency=low + + * uninit: Delete the git-annex branch. + + -- Joey Hess Mon, 04 Jul 2011 15:50:21 -0400 + git-annex (3.20110702) unstable; urgency=low * Now the web can be used as a special remote.