summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/git/repo_commit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go
index 1f211aaca2..d20c6540eb 100644
--- a/modules/git/repo_commit.go
+++ b/modules/git/repo_commit.go
@@ -319,7 +319,7 @@ func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List
var stdout []byte
var err error
if before == nil {
- stdout, err = NewCommand("rev-list", before.ID.String()).RunInDirBytes(repo.Path)
+ stdout, err = NewCommand("rev-list", last.ID.String()).RunInDirBytes(repo.Path)
} else {
stdout, err = NewCommand("rev-list", before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path)
}