git ssb

16+

Dominic / patchbay



Commit 79f58730093477d5ea1846198244ca7f1e137436

Sort git tags in an update

Charles Lehner committed on 8/2/2016, 12:43:13 AM
Parent: faff49e67cc84e5fa54a14136d98a6126f176499

Files changed

modules/git.jschanged
modules/git.jsView
@@ -125,23 +125,23 @@
125125 rel: 'repo',
126126 values: true
127127 }),
128128 pull.drain(function (link) {
129- var refUpdates = link.value.content.refs
130- for (var ref in refUpdates) {
131- if (refs[ref]) continue
129+ var refUpdates = link.value.content.refs || {}
130+ Object.keys(refUpdates).reverse().filter(function (ref) {
131+ if (refs[ref]) return
132132 refs[ref] = true
133133 var rev = refUpdates[ref]
134- if (!rev) continue
134+ if (!rev) return
135135 var parts = /^refs\/(heads|tags)\/(.*)$/.exec(ref) || []
136136 var t
137137 if (parts[1] === 'heads') t = branchesT
138138 else if (parts[1] === 'tags') t = tagsT
139139 if (t) t.append(h('tr',
140140 h('td', parts[2]),
141141 h('td', h('code', rev)),
142142 h('td', messageTimestampLink(link))))
143- }
143+ })
144144 }, function (err) {
145145 if (err) console.error(err)
146146 })
147147 )

Built with git-ssb-web