diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index 8762b63e2e8cb..d95c67791b23f 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -318,7 +318,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) }