mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 14:43:52 +03:00
Fix commit between two commits calculation if there is only last commit (#10225)
This commit is contained in:
parent
26eaebf4de
commit
852aeeffc0
1 changed files with 1 additions and 1 deletions
|
@ -319,7 +319,7 @@ func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List
|
||||||
var stdout []byte
|
var stdout []byte
|
||||||
var err error
|
var err error
|
||||||
if before == nil {
|
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 {
|
} else {
|
||||||
stdout, err = NewCommand("rev-list", before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path)
|
stdout, err = NewCommand("rev-list", before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue