mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +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:
parent
2635778425
commit
b26c3b482f
7 changed files with 76 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue