git ssb

30+

cel / git-ssb-web



Commit ed1a05614a2839f00048232d40536e714bc8c0f8

Don't show branch info on empty repo

cel committed on 11/22/2016, 3:07:03 AM
Parent: 5dba96e0853a4d7f84670f78b8043ab9bd5adc08

Files changed

lib/repos/index.jschanged
lib/repos/index.jsView
@@ -293,8 +293,9 @@
293293 (repo.head == `refs/heads/${rev}` ? '' : `@${rev}`)
294294
295295 return this.serveRepoTemplate(req, repo, 'code', rev, title,
296296 u.readNext((cb) => {
297 + if (!rev) return cb(null, this.renderEmptyRepo(req, repo))
297298 repo.getLatestAvailableRev(rev, 10e3, (err, revGot, numSkipped) => {
298299 if (err) return cb(err)
299300 cb(null, cat([
300301 h('section', {class: 'branch-info light-grey', method: 'get'}, [
@@ -310,12 +311,10 @@
310311 )
311312 ),
312313 u.when(type === 'Branch', () => renderRepoLatest(req, repo, revGot))
313314 ]),
314- rev ? cat([
315- h('section', {class: 'files'}, renderRepoTree(req, repo, revGot, path)),
316- this.renderRepoReadme(req, repo, revGot, path)
317- ]) : this.renderEmptyRepo(req, repo)
315 + h('section', {class: 'files'}, renderRepoTree(req, repo, revGot, path)),
316 + this.renderRepoReadme(req, repo, revGot, path)
318317 ]))
319318 })
320319 }))
321320 }

Built with git-ssb-web