]> source.dussan.org Git - gitea.git/commit
Deduplicate findReadmeFile() (#22177)
authorNick <nick.guenther@polymtl.ca>
Sun, 12 Feb 2023 07:08:10 +0000 (02:08 -0500)
committerGitHub <noreply@github.com>
Sun, 12 Feb 2023 07:08:10 +0000 (15:08 +0800)
commite1aca7cbddea61f0802810cd2a05fa121c3d15ef
treecd405aa2a759e5980e3ea9cfc584648d17a04c18
parentb0f18726a34edeb47b6442ce06ebee102b9c8a83
Deduplicate findReadmeFile() (#22177)

This code was copy-pasted at some point. Revisit it to reunify it.

~~Doing that then encouraged simplifying the types of a couple of
related functions.~~

~~As a follow-up, move two helper functions, `isReadmeFile()` and
`isReadmeFileExtension()`, intimately tied to `findReadmeFile()`, in as
package-private.~~

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
modules/git/tree_entry.go
routers/web/repo/view.go