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.
This commit is contained in:
parent
e4ba0934c2
commit
e296da4bfe
4 changed files with 3 additions and 9 deletions
|
@ -57,9 +57,7 @@ checkUnused = do
|
||||||
where
|
where
|
||||||
list file msg l c = do
|
list file msg l c = do
|
||||||
let unusedlist = number c l
|
let unusedlist = number c l
|
||||||
unless (null l) $ do
|
unless (null l) $ showLongNote $ msg unusedlist
|
||||||
showLongNote $ msg unusedlist
|
|
||||||
showLongNote "\n"
|
|
||||||
writeUnusedFile file unusedlist
|
writeUnusedFile file unusedlist
|
||||||
return $ c + length l
|
return $ c + length l
|
||||||
|
|
||||||
|
@ -76,9 +74,7 @@ checkRemoteUnused' r = do
|
||||||
let remoteunused = remotehas `exclude` referenced
|
let remoteunused = remotehas `exclude` referenced
|
||||||
let list = number 0 remoteunused
|
let list = number 0 remoteunused
|
||||||
writeUnusedFile "" list
|
writeUnusedFile "" list
|
||||||
unless (null remoteunused) $ do
|
unless (null remoteunused) $ showLongNote $ remoteUnusedMsg r list
|
||||||
showLongNote $ remoteUnusedMsg r list
|
|
||||||
showLongNote "\n"
|
|
||||||
where
|
where
|
||||||
{- This should run strictly to avoid the filterM
|
{- This should run strictly to avoid the filterM
|
||||||
- building many thunks containing keyLocations data. -}
|
- building many thunks containing keyLocations data. -}
|
||||||
|
|
|
@ -40,7 +40,6 @@ perform key = do
|
||||||
pp' <- prettyPrintUUIDs "untrusted" untrustedlocations
|
pp' <- prettyPrintUUIDs "untrusted" untrustedlocations
|
||||||
unless (null untrustedlocations) $
|
unless (null untrustedlocations) $
|
||||||
showLongNote $ untrustedheader ++ pp'
|
showLongNote $ untrustedheader ++ pp'
|
||||||
unless (null locations) showOutput
|
|
||||||
if null safelocations then stop else next $ return True
|
if null safelocations then stop else next $ return True
|
||||||
where
|
where
|
||||||
copiesplural 1 = "copy"
|
copiesplural 1 = "copy"
|
||||||
|
|
|
@ -57,7 +57,7 @@ showOutput :: Annex ()
|
||||||
showOutput = handle q $ putStr "\n"
|
showOutput = handle q $ putStr "\n"
|
||||||
|
|
||||||
showLongNote :: String -> Annex ()
|
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 :: Annex ()
|
||||||
showEndOk = showEndResult True
|
showEndOk = showEndResult True
|
||||||
|
|
|
@ -123,7 +123,6 @@ push = do
|
||||||
showLongNote $
|
showLongNote $
|
||||||
"git-annex branch created\n" ++
|
"git-annex branch created\n" ++
|
||||||
"Be sure to push this branch when pushing to remotes.\n"
|
"Be sure to push this branch when pushing to remotes.\n"
|
||||||
showOutput
|
|
||||||
|
|
||||||
{- Old .gitattributes contents, not needed anymore. -}
|
{- Old .gitattributes contents, not needed anymore. -}
|
||||||
attrLines :: [String]
|
attrLines :: [String]
|
||||||
|
|
Loading…
Reference in a new issue