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

@ -55,7 +55,7 @@ start (name:rest) = go =<< filter matchingname <$> Annex.fromRepo Git.remotes
startNormalRemote :: Git.RemoteName -> [String] -> Git.Repo -> CommandStart
startNormalRemote name restparams r
| null restparams = do
showStart "enableremote" name
showStart' "enableremote" (Just name)
next $ next $ do
setRemoteIgnore r False
r' <- Remote.Git.configRead False r
@ -77,7 +77,7 @@ startSpecialRemote name config Nothing = do
startSpecialRemote name config (Just (u, c)) = do
let fullconfig = config `M.union` c
t <- either giveup return (Annex.SpecialRemote.findType fullconfig)
showStart "enableremote" name
showStart' "enableremote" (Just name)
gc <- maybe (liftIO dummyRemoteGitConfig)
(return . Remote.gitconfig)
=<< Remote.byUUID u