From 8efd6b32e2ecbd5c6933242cb0bb66612ecbad24 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 11 Feb 2020 05:10:12 +0200 Subject: [PATCH] Fix commit between two commits calculation if there is only last commit (#10225) (#10226) --- modules/git/repo_commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }