summaryrefslogtreecommitdiff
path: root/Command/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-11-28 14:40:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-11-28 15:14:16 -0400
commit699611cde5cda8b2f2d83a6d6ac9c1e575b74f51 (patch)
treeb502247490779aca8068684a3be42791050eff7b /Command/Unused.hs
parentbf5de3a6f3d50028f7ac47c6cde759a6f5110b08 (diff)
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.
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r--Command/Unused.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 916e6db25..27018cf38 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -70,7 +70,7 @@ start o = do
Just "." -> (".", checkUnused refspec)
Just "here" -> (".", checkUnused refspec)
Just n -> (n, checkRemoteUnused n refspec)
- showStart "unused" name
+ showStart' "unused" (Just name)
next perform
checkUnused :: RefSpec -> CommandPerform
@@ -338,5 +338,5 @@ startUnused message unused badunused tmpunused maps n = search
case M.lookup n m of
Nothing -> search rest
Just key -> do
- showStart message (show n)
+ showStart' message (Just $ show n)
next $ a key