diff options
author | Lauris BH <lauris@nix.lv> | 2020-02-11 01:04:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 01:04:43 +0200 |
commit | 852aeeffc0a9902e75cd599d5a4fb706e56dcef7 (patch) | |
tree | a76effe72701f80472d67dbea5e624e92f7cd524 /modules | |
parent | 26eaebf4dee5144f90a9bb72fd8dd871c8c1fd06 (diff) | |
download | gitea-852aeeffc0a9902e75cd599d5a4fb706e56dcef7.tar.gz gitea-852aeeffc0a9902e75cd599d5a4fb706e56dcef7.zip |
Fix commit between two commits calculation if there is only last commit (#10225)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/git/repo_commit.go | 2 |
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) } |