@@ -193,7 +193,7 @@ func getWikiPage(ctx *context.APIContext, wikiName wiki_service.WebPath) *api.Wi
193
193
}
194
194
195
195
// get commit count - wiki revisions
196
- commitsCount , _ := wikiRepo .FileCommitsCount ("master" , pageFilename )
196
+ commitsCount , _ := wikiRepo .FileCommitsCount (ctx . Repo . Repository . DefaultWikiBranch , pageFilename )
197
197
198
198
// Get last change information.
199
199
lastCommit , err := wikiRepo .GetCommitByPath (pageFilename )
@@ -432,7 +432,7 @@ func ListPageRevisions(ctx *context.APIContext) {
432
432
}
433
433
434
434
// get commit count - wiki revisions
435
- commitsCount , _ := wikiRepo .FileCommitsCount ("master" , pageFilename )
435
+ commitsCount , _ := wikiRepo .FileCommitsCount (ctx . Repo . Repository . DefaultWikiBranch , pageFilename )
436
436
437
437
page := ctx .FormInt ("page" )
438
438
if page <= 1 {
@@ -442,7 +442,7 @@ func ListPageRevisions(ctx *context.APIContext) {
442
442
// get Commit Count
443
443
commitsHistory , err := wikiRepo .CommitsByFileAndRange (
444
444
git.CommitsByFileAndRangeOptions {
445
- Revision : "master" ,
445
+ Revision : ctx . Repo . Repository . DefaultWikiBranch ,
446
446
File : pageFilename ,
447
447
Page : page ,
448
448
})
@@ -486,7 +486,7 @@ func findWikiRepoCommit(ctx *context.APIContext) (*git.Repository, *git.Commit)
486
486
return nil , nil
487
487
}
488
488
489
- commit , err := wikiRepo .GetBranchCommit ("master" )
489
+ commit , err := wikiRepo .GetBranchCommit (ctx . Repo . Repository . DefaultWikiBranch )
490
490
if err != nil {
491
491
if git .IsErrNotExist (err ) {
492
492
ctx .NotFound (err )
0 commit comments