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:
parent
d6d8f72957
commit
4781ca297b
46 changed files with 74 additions and 67 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue