diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-09 01:45:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-09 01:45:41 -0400 |
commit | e296da4bfef21c55fc23376300becb17a08eea83 (patch) | |
tree | 8ca17713ac97616deafd1c3c3e475dc062484233 | |
parent | e4ba0934c2992f00275bd24e8c4d25d6b9ea10ff (diff) |
more newline fixes
Adds a missing newline when a longnote is followed by a endresult.
Multiple longnotes in a row will now be separated by a blank line, which
could be a bug or a feature depending on taste.
Removed several places where newlines were explicitly displayed after
longnotes.
-rw-r--r-- | Command/Unused.hs | 8 | ||||
-rw-r--r-- | Command/Whereis.hs | 1 | ||||
-rw-r--r-- | Messages.hs | 2 | ||||
-rw-r--r-- | Upgrade/V2.hs | 1 |
4 files changed, 3 insertions, 9 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 6a62cde5f..960b2e1df 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -57,9 +57,7 @@ checkUnused = do where list file msg l c = do let unusedlist = number c l - unless (null l) $ do - showLongNote $ msg unusedlist - showLongNote "\n" + unless (null l) $ showLongNote $ msg unusedlist writeUnusedFile file unusedlist return $ c + length l @@ -76,9 +74,7 @@ checkRemoteUnused' r = do let remoteunused = remotehas `exclude` referenced let list = number 0 remoteunused writeUnusedFile "" list - unless (null remoteunused) $ do - showLongNote $ remoteUnusedMsg r list - showLongNote "\n" + unless (null remoteunused) $ showLongNote $ remoteUnusedMsg r list where {- This should run strictly to avoid the filterM - building many thunks containing keyLocations data. -} diff --git a/Command/Whereis.hs b/Command/Whereis.hs index 850975048..74660f283 100644 --- a/Command/Whereis.hs +++ b/Command/Whereis.hs @@ -40,7 +40,6 @@ perform key = do pp' <- prettyPrintUUIDs "untrusted" untrustedlocations unless (null untrustedlocations) $ showLongNote $ untrustedheader ++ pp' - unless (null locations) showOutput if null safelocations then stop else next $ return True where copiesplural 1 = "copy" diff --git a/Messages.hs b/Messages.hs index 492251981..c663c17c2 100644 --- a/Messages.hs +++ b/Messages.hs @@ -57,7 +57,7 @@ showOutput :: Annex () showOutput = handle q $ putStr "\n" showLongNote :: String -> Annex () -showLongNote s = handle (JSON.note s) $ putStr $ '\n' : indent s +showLongNote s = handle (JSON.note s) $ putStrLn $ '\n' : indent s showEndOk :: Annex () showEndOk = showEndResult True diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs index ffd0f0653..e99a7cf81 100644 --- a/Upgrade/V2.hs +++ b/Upgrade/V2.hs @@ -123,7 +123,6 @@ push = do showLongNote $ "git-annex branch created\n" ++ "Be sure to push this branch when pushing to remotes.\n" - showOutput {- Old .gitattributes contents, not needed anymore. -} attrLines :: [String] |