| 542 | } |
| 543 | |
| 544 | func setCommitStatuses(unpushedCommitHashes *set.Set[string], unmergedCommitHashes *set.Set[string], commits []*models.Commit) { |
| 545 | for i, commit := range commits { |
| 546 | if commit.IsTODO() { |
| 547 | continue |
| 548 | } |
| 549 | |
| 550 | if unmergedCommitHashes == nil || unmergedCommitHashes.Includes(commit.Hash()) { |
| 551 | if unpushedCommitHashes != nil && unpushedCommitHashes.Includes(commit.Hash()) { |
| 552 | commits[i].Status = models.StatusUnpushed |
| 553 | } else { |
| 554 | commits[i].Status = models.StatusPushed |
| 555 | } |
| 556 | } else { |
| 557 | commits[i].Status = models.StatusMerged |
| 558 | } |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | func (self *CommitLoader) getReachableHashes(refName string, notRefNames []string) *set.Set[string] { |
| 563 | output, _, err := self.cmd.New( |