showStart variant for when there's no worktree file

Clean up some uses of showStart with "" for the file,
or in some cases, a non-filename description string. That would
generate bad json, although none of the commands doing that
supported --json.

Using "" for the file resulted in output like "foo  rest";
now the extra space is eliminated.

This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
Joey Hess 2017-11-28 14:40:26 -04:00
parent d6d8f72957
commit 4781ca297b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
46 changed files with 74 additions and 67 deletions

View file

@ -78,7 +78,7 @@ seek (MultiCastOptions Receive _ _) = giveup "Cannot specify list of files with
genAddress :: CommandStart
genAddress = do
showStart "gen-address" ""
showStart' "gen-address" Nothing
k <- uftpKey
(s, ok) <- case k of
KeyContainer s -> liftIO $ genkey (Param s)
@ -130,7 +130,7 @@ send ups fs = withTmpFile "send" $ \t h -> do
whenM isDirect $
giveup "Sorry, multicast send cannot be done from a direct mode repository."
showStart "generating file list" ""
showStart' "generating file list" Nothing
fs' <- seekHelper LsFiles.inRepo =<< workTreeItems fs
matcher <- Limit.getMatcher
let addlist f o = whenM (matcher $ MatchingFile $ FileInfo f f) $
@ -143,7 +143,7 @@ send ups fs = withTmpFile "send" $ \t h -> do
liftIO $ hClose h
showEndOk
showStart "sending files" ""
showStart' "sending files" Nothing
showOutput
serverkey <- uftpKey
u <- getUUID
@ -169,7 +169,7 @@ send ups fs = withTmpFile "send" $ \t h -> do
receive :: [CommandParam] -> CommandStart
receive ups = do
showStart "receiving multicast files" ""
showStart' "receiving multicast files" Nothing
showNote "Will continue to run until stopped by ctrl-c"
showOutput