git ssb

16+

Dominic / patchbay



Commit ee8e1779c416856ab3a0b428285c16ae3fd3d48a

Get names of self-named git repos

Fix %UMG1tg0QnInvuUFY0HlsT0FI4ro6vW0wFiVefh283+s=.sha256
cel committed on 11/22/2016, 11:14:49 PM
Parent: 1ebcea6c780b22911d8d71b9326be4539254272a

Files changed

modules_basic/names.jschanged
modules_basic/names.jsView
@@ -91,14 +91,33 @@
9191 })
9292 )
9393 }
9494
95 +var queryNamedGitRepos = [
96 + {$filter: {
97 + value: {
98 + content: {
99 + type: "git-repo",
100 + name: {"$prefix": ""}
101 + }
102 + }
103 + }},
104 + {$map: {
105 + name: ["value", "content", "name"],
106 + id: ['key'],
107 + ts: "timestamp"
108 + }},
109 + reduce
110 +]
111 +
112 +
95113 exports.connection_status = function (err) {
96114 if(!err) {
97115 pull(
98116 many([
99117 sbot_links2({query: [filter, map, reduce]}),
100- add_sigil(sbot_query({query: [filter2, map2, reduce]}))
118 + add_sigil(sbot_query({query: [filter2, map2, reduce]})),
119 + add_sigil(sbot_query({query: queryNamedGitRepos}))
101120 ]),
102121 //reducing also ensures order by the lookup properties
103122 //in this case: [name, id]
104123 mfr.reduce(merge),
@@ -112,9 +131,10 @@
112131 )
113132
114133 pull(many([
115134 sbot_links2({query: [filter, map], old: false}),
116- add_sigil(sbot_query({query: [filter2, map2], old: false}))
135 + add_sigil(sbot_query({query: [filter2, map2], old: false})),
136 + add_sigil(sbot_query({query: queryNamedGitRepos, old: false}))
117137 ]),
118138 pull.drain(update))
119139 }
120140 }

Built with git-ssb-web