diff --git a/Command/Map.hs b/Command/Map.hs index 0deb5a6029..9ecceea2f0 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -47,7 +47,7 @@ start = startingNoMessage (ActionItemOther Nothing) $ do umap <- uuidDescMap trustmap <- trustMapLoad - + ifM (outputJSONMap rs trustmap umap) ( next $ return True , do @@ -108,8 +108,8 @@ hostname r basehostname :: Git.Repo -> String basehostname r = fromMaybe "" $ headMaybe $ splitc '.' $ hostname r -{- A name to display for a repo. Uses the name from uuid.log if available, - - or the remote name if not. -} +{- A name to display for a repo. Uses the description + - from uuid.log if available, or the remote name if not. -} repoName :: UUIDDescMap -> Git.Repo -> String repoName umap r | repouuid == NoUUID = fallback @@ -307,14 +307,14 @@ outputJSONMap rs trustmap umap = ] mknode (r, remotes) = JSON.object - [ "name" .= packString (repoName umap r) + [ "description" .= packString (repoName umap r) , "uuid" .= mkuuid (getUncachedUUID r) , "url" .= packString (Git.repoLocation r) , "remotes" .= map mkremote (filterdead id remotes) ] mkremote r = JSON.object - [ "name" .= packString (repoName umap r) + [ "remote" .= packString (repoName umap r) , "uuid" .= mkuuid (getUncachedUUID r) , "url" .= packString (Git.repoLocation r) ] diff --git a/doc/todo/map__58___add_--json/comment_2_e9d4957cf5a3d5c015108cb1805df7da._comment b/doc/todo/map__58___add_--json/comment_2_e9d4957cf5a3d5c015108cb1805df7da._comment index 15691af277..9463fe12f2 100644 --- a/doc/todo/map__58___add_--json/comment_2_e9d4957cf5a3d5c015108cb1805df7da._comment +++ b/doc/todo/map__58___add_--json/comment_2_e9d4957cf5a3d5c015108cb1805df7da._comment @@ -10,10 +10,10 @@ Example output, after being passed through `jq` to pretty-print it: { "nodes": [ { - "name": "joey@darkstar:~/tmp/mapbench/a", + "description": "joey@darkstar:~/tmp/mapbench/a", "remotes": [ { - "name": "joey@darkstar:~/tmp/mapbench/b", + "remote": "b", "url": "/home/joey/tmp/mapbench/b", "uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015" } @@ -22,10 +22,10 @@ Example output, after being passed through `jq` to pretty-print it: "uuid": "3f34e4c2-dd19-433a-ab04-9fd4be959325" }, { - "name": "joey@darkstar:~/tmp/mapbench/b", + "description": "joey@darkstar:~/tmp/mapbench/b", "remotes": [ { - "name": "joey@darkstar:~/tmp/mapbench/a", + "remote": "a", "url": "/home/joey/tmp/mapbench/a", "uuid": "3f34e4c2-dd19-433a-ab04-9fd4be959325" } @@ -34,10 +34,10 @@ Example output, after being passed through `jq` to pretty-print it: "uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015" }, { - "name": "unknown", + "description": "unknown", "remotes": [ { - "name": "joey@darkstar:~/tmp/mapbench/b", + "remote": "b", "url": "/home/joey/tmp/mapbench/b", "uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015" }