1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 19:48:19 +00:00

Add TestPrepareWikiFileName (#16487) (#16498)

* Add TestPrepareWikiFileName

* use LsTree as LsFiles is index only

* ajust other tests

Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
6543
2021-07-21 04:37:00 +02:00
committed by GitHub
parent 0c3467ffb7
commit 09a4364b21
7 changed files with 76 additions and 4 deletions

View File

@@ -88,7 +88,7 @@ func prepareWikiFileName(gitRepo *git.Repository, wikiName string) (bool, string
escaped := NameToFilename(wikiName)
// Look for both files
filesInIndex, err := gitRepo.LsFiles(unescaped, escaped)
filesInIndex, err := gitRepo.LsTree("master", unescaped, escaped)
if err != nil {
log.Error("%v", err)
return false, escaped, err