1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Add TestPrepareWikiFileName (#16487)

* 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-20 15:16:20 +02:00
committed by GitHub
parent 2635778425
commit b26c3b482f
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