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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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