From d800a44a26216747b1a60a21090c581dfbe23ff4 Mon Sep 17 00:00:00 2001 From: slene Date: Fri, 28 Mar 2014 19:34:01 +0800 Subject: [PATCH] display commits by sha1 id --- models/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/git.go b/models/git.go index e2ee52083d7..34f0267f65b 100644 --- a/models/git.go +++ b/models/git.go @@ -244,11 +244,11 @@ func GetCommitsByCommitId(userName, repoName, commitId string) (*list.List, erro if err != nil { return nil, err } - r, err := repo.LookupReference(commitId) + oid, err := git.NewOidFromString(commitId) if err != nil { return nil, err } - return r.AllCommits() + return repo.CommitsBefore(oid) } // Diff line types.