New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gogs chooses the wrong README sometimes #877
Comments
Thanks your feedback! You're right, Gogs should also check that the 7th character is |
Wouldn't that break repos which just have a file named "README"? (no .md) |
Good catch, just check length first, then see if the 7th is |
Hi @jiphex , @jcracknell , I've pushed fix on |
Seems OK: https://try.gogs.io/testzz/issue877 |
Great! |
It still chooses the wrong README as in the case of this mirror |
If I have a repo with a file named (for example)
README-stuff.md
as well asREADME.md
, Gogs will choose to display the former instead of the latter which would be expected. This is different from the behaviour of say, Github.It looks like this is because the check for whether a file is a README just checks if
filename[:6]
is "README", and the view gives up when it finds the first file.I've used this for extra documentation about specific aspects of the project, e.g README-Building.md. Github does the right thing here.
The text was updated successfully, but these errors were encountered: