@@ -177,17 +177,17 @@ func getWikiPage(ctx *context.APIContext, wikiName wiki_service.WebPath) *api.Wi
177177 }
178178
179179 // lookup filename in wiki - get filecontent, real filename
180- content , pageFilename := wikiContentsByName (ctx , commit , wikiName , false )
180+ content , pageFilename := wikiContentsByName (ctx , wikiRepo , commit , wikiName , false )
181181 if ctx .Written () {
182182 return nil
183183 }
184184
185- sidebarContent , _ := wikiContentsByName (ctx , commit , "_Sidebar" , true )
185+ sidebarContent , _ := wikiContentsByName (ctx , wikiRepo , commit , "_Sidebar" , true )
186186 if ctx .Written () {
187187 return nil
188188 }
189189
190- footerContent , _ := wikiContentsByName (ctx , commit , "_Footer" , true )
190+ footerContent , _ := wikiContentsByName (ctx , wikiRepo , commit , "_Footer" , true )
191191 if ctx .Written () {
192192 return nil
193193 }
@@ -423,7 +423,7 @@ func ListPageRevisions(ctx *context.APIContext) {
423423 }
424424
425425 // lookup filename in wiki - get filecontent, gitTree entry , real filename
426- _ , pageFilename := wikiContentsByName (ctx , commit , pageName , false )
426+ _ , pageFilename := wikiContentsByName (ctx , wikiRepo , commit , pageName , false )
427427 if ctx .Written () {
428428 return
429429 }
@@ -509,9 +509,9 @@ func wikiContentsByEntry(ctx *context.APIContext, entry *git.TreeEntry) string {
509509
510510// wikiContentsByName returns the contents of a wiki page, along with a boolean
511511// indicating whether the page exists. Writes to ctx if an error occurs.
512- func wikiContentsByName (ctx * context.APIContext , commit * git.Commit , wikiName wiki_service.WebPath , isSidebarOrFooter bool ) (string , string ) {
512+ func wikiContentsByName (ctx * context.APIContext , wikiRepo * git. Repository , commit * git.Commit , wikiName wiki_service.WebPath , isSidebarOrFooter bool ) (string , string ) {
513513 gitFilename := wiki_service .WebPathToGitPath (wikiName )
514- entry , err := findEntryForFile (git .NewTree (ctx . Repo . GitRepo , commit .TreeID ), gitFilename )
514+ entry , err := findEntryForFile (git .NewTree (wikiRepo , commit .TreeID ), gitFilename )
515515 if err != nil {
516516 if git .IsErrNotExist (err ) {
517517 if ! isSidebarOrFooter {
0 commit comments