all repos — elgit @ 4447fcda1f06f4d516dfd40e3d306da193aaeeae

fork of legit: web frontend for git, written in go

git: add unlisted repositories

Marco Andronaco
commit

4447fcda1f06f4d516dfd40e3d306da193aaeeae

parent

c75aa9f52fd81f4591ed42882c44d26b04d5b0e2

1 file changed, 4 insertions(+), 7 deletions(-)

changed files
M routes/routes.goroutes/routes.go
@@ -40,11 +40,12 @@
infos := []info{} for _, dir := range dirs { - if !dir.IsDir() || d.isIgnored(dir.Name()) { + name := dir.Name() + if !dir.IsDir() || d.isIgnored(name) || d.isUnlisted(name) { continue } - path := filepath.Join(d.c.Repo.ScanPath, dir.Name()) + path := filepath.Join(d.c.Repo.ScanPath, name) gr, err := git.Open(path, "") if err != nil { log.Println(err)
@@ -58,14 +59,10 @@ log.Println(err)
return } - name := dir.Name() - - desc := getDescription(path) - infos = append(infos, info{ DisplayName: getDisplayName(name), Name: name, - Desc: desc, + Desc: getDescription(path), Idle: humanize.Time(c.Author.When), d: c.Author.When, })