Browse Source

Fix commit between two commits calculation if there is only last commit (#10225)

tags/v1.10.5
Lauris BH 4 years ago
parent
commit
852aeeffc0
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      modules/git/repo_commit.go

+ 1
- 1
modules/git/repo_commit.go View File

@@ -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)
}

Loading…
Cancel
Save