Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fc59665

Browse files
committed
Fix bug
1 parent f25d088 commit fc59665

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎modules/git/commit_info_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func testGetCommitsInfo(t *testing.T, repo1 *Repository) {
6262
continue
6363
}
6464
assert.NotNil(t, commit)
65-
assert.NotEmpty(t, commit.TreeID)
65+
assert.NotNil(t, commit.TreeID)
6666

6767
tree, err := NewTree(repo1, commit.TreeID).SubTree(testCase.Path)
6868
if err != nil {

‎routers/api/v1/repo/wiki.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func getWikiPage(ctx *context.APIContext, wikiName wiki_service.WebPath) *api.Wi
196196
commitsCount, _ := wikiRepo.FileCommitsCount(ctx.Repo.Repository.DefaultWikiBranch, pageFilename)
197197

198198
// Get last change information.
199-
lastCommit, err := wikiRepo.GetCommitByPath(commit.ID, pageFilename)
199+
lastCommit, err := wikiRepo.GetCommitByPathDefaultBranch(pageFilename)
200200
if err != nil {
201201
ctx.APIErrorInternal(err)
202202
return nil
@@ -317,7 +317,7 @@ func ListWikiPages(ctx *context.APIContext) {
317317
if i < skip || i >= maxNum || !entry.IsRegular() {
318318
continue
319319
}
320-
c, err := wikiRepo.GetCommitByPath(commit.ID, entry.Name())
320+
c, err := wikiRepo.GetCommitByPathDefaultBranch(entry.Name())
321321
if err != nil {
322322
ctx.APIErrorInternal(err)
323323
return

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /