Monorepo for Tangled tangled.org

appview: repo: fix potentially nil commit in branches

old knots will not attach a commit to a branch. sorting by commit time
fails in these responses.

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li fc8938c5 6d3ed294

verified
Changed files
+2 -2
appview
repo
+2 -2
appview/repo/repo.go
··· 119 if b.IsDefault { 120 return 1 121 } 122 - if a.Commit != nil { 123 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 124 return 1 125 } else { ··· 630 if b.IsDefault { 631 return 1 632 } 633 - if a.Commit != nil { 634 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 635 return 1 636 } else {
··· 119 if b.IsDefault { 120 return 1 121 } 122 + if a.Commit != nil && b.Commit != nil { 123 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 124 return 1 125 } else { ··· 630 if b.IsDefault { 631 return 1 632 } 633 + if a.Commit != nil && b.Commit != nil { 634 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 635 return 1 636 } else {