aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Drop.hs2
-rw-r--r--Command/Fsck.hs2
-rw-r--r--Command/Import.hs2
-rw-r--r--Command/InitRemote.hs2
-rw-r--r--Command/Uninit.hs2
-rw-r--r--Command/Unlock.hs8
-rw-r--r--Command/WebApp.hs2
7 files changed, 10 insertions, 10 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs
index a9eec7825..3a30703d5 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -79,7 +79,7 @@ performRemote key numcopies remote = lockContent key $ do
stopUnless (canDropKey key numcopies have tocheck [uuid]) $ do
ok <- Remote.removeKey remote key
next $ cleanupRemote key remote ok
- where
+ where
uuid = Remote.uuid remote
cleanupLocal :: Key -> CommandCleanup
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index deb3a5c81..09f8b1136 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -206,7 +206,7 @@ fixLink key file = do
return True
{- Checks that the location log reflects the current status of the key,
- in this repository only. -}
+ - in this repository only. -}
verifyLocationLog :: Key -> String -> Annex Bool
verifyLocationLog key desc = do
present <- inAnnex key
diff --git a/Command/Import.hs b/Command/Import.hs
index e27a421f2..cf91f7b5a 100644
--- a/Command/Import.hs
+++ b/Command/Import.hs
@@ -33,7 +33,7 @@ perform srcfile destfile = do
unlessM (Annex.getState Annex.force) $
error $ "not overwriting existing " ++ destfile ++
" (use --force to override)"
-
+
liftIO $ createDirectoryIfMissing True (parentDir destfile)
liftIO $ moveFile srcfile destfile
Command.Add.perform destfile
diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs
index 720fdddf5..684f868ef 100644
--- a/Command/InitRemote.hs
+++ b/Command/InitRemote.hs
@@ -52,7 +52,7 @@ cleanup :: UUID -> String -> R.RemoteConfig -> CommandCleanup
cleanup u name c = do
describeUUID u name
Logs.Remote.configSet u c
- return True
+ return True
{- Look up existing remote's UUID and config by name, or generate a new one -}
findByName :: String -> Annex (UUID, R.RemoteConfig)
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index a86044410..37b3ff511 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -19,7 +19,7 @@ import Annex.Content
def :: [Command]
def = [addCheck check $ command "uninit" paramPaths seek
- "de-initialize git-annex and clean out repository"]
+ "de-initialize git-annex and clean out repository"]
check :: Annex ()
check = do
diff --git a/Command/Unlock.hs b/Command/Unlock.hs
index 6489fc333..5a0e6efeb 100644
--- a/Command/Unlock.hs
+++ b/Command/Unlock.hs
@@ -39,12 +39,12 @@ perform dest key = do
tmpdest <- fromRepo $ gitAnnexTmpLocation key
liftIO $ createDirectoryIfMissing True (parentDir tmpdest)
showAction "copying"
- ok <- liftIO $ copyFileExternal src tmpdest
- if ok
- then do
+ ifM (liftIO $ copyFileExternal src tmpdest)
+ ( do
liftIO $ do
removeFile dest
moveFile tmpdest dest
thawContent dest
next $ return True
- else error "copy failed!"
+ , error "copy failed!"
+ )
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index 1d97eb304..11ba23d83 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -30,7 +30,7 @@ import Control.Concurrent.STM
def :: [Command]
def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
- command "webapp" paramNothing seek "launch webapp"]
+ command "webapp" paramNothing seek "launch webapp"]
seek :: [CommandSeek]
seek = [withNothing start]