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
  • Loading branch information
lafriks authored Feb 10, 2020
1 parent 26eaebf commit 852aeef
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 @@ -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)
}
Expand Down

0 comments on commit 852aeef

Please sign in to comment.