Skip to content

Commit

Permalink
Fix commit between two commits calculation if there is only last comm…
Browse files Browse the repository at this point in the history
…it (#10225) (#10226)
  • Loading branch information
lafriks authored Feb 11, 2020
1 parent c95d960 commit 8efd6b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/git/repo_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8efd6b3

Please sign in to comment.