2 files changed,
5 insertions(+),
13 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-02-11 01:32:34 +0200
Authored at:
2026-02-11 00:44:14 +0200
Change ID:
stvoqynwwxqxmlnqqzlmtvlmrnxlqult
Parent:
9c82bda
jump to
| M | internal/git/repo.go |
| M | internal/handlers/repo.go |
M
internal/handlers/repo.go
路路路 403 403 normalizedName := getNormalizedName(name) 404 404 repo, err := h.openPublicRepo(normalizedName, "") 405 405 if err != nil { 406 - if errors.Is(err, errPrivateRepo) { 407 - continue 408 - } 409 - errs = append(errs, err) 406 + // if it's not git repo, just ignore it 410 407 continue 411 408 } 412 409 路路路 416 413 continue 417 414 } 418 415 419 - var lastCommitTime time.Time 420 416 lastCommit, err := repo.LastCommit() 421 417 if err != nil { 422 - if !errors.Is(err, git.ErrEmptyRepo) { 423 - errs = append(errs, err) 424 - continue 425 - } 426 - } else { 427 - lastCommitTime = lastCommit.Committed 418 + errs = append(errs, err) 419 + continue 428 420 } 429 421 430 422 repos = append(repos, repoList{ 431 423 Name: normalizedName, 432 424 Desc: desc, 433 - LastCommit: lastCommitTime, 425 + LastCommit: lastCommit.Committed, 434 426 }) 435 427 } 436 428