diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2026-01-12 17:10:21 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2026-01-13 14:18:14 +0000 |
| commit | 85894026b1b003844e8fda94056d80d88294b0be (patch) | |
| tree | 405e1ed964a1d9ed2df0d813a366ffdde29b4780 /syz-cluster/pkg | |
| parent | ce94b10583a205d365175b0f18ed2c9d0765559c (diff) | |
pkg/vcs: return multiple base commit candidates
Return the commits that represent unique sets of branches.
Sort the list topologically, breaking ties by commit date.
Diffstat (limited to 'syz-cluster/pkg')
| -rw-r--r-- | syz-cluster/pkg/triage/git.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/syz-cluster/pkg/triage/git.go b/syz-cluster/pkg/triage/git.go index 58437c913..fb23a90b3 100644 --- a/syz-cluster/pkg/triage/git.go +++ b/syz-cluster/pkg/triage/git.go @@ -58,5 +58,9 @@ func (ops *GitTreeOps) ApplySeries(commit string, patches [][]byte) error { } func (ops *GitTreeOps) BaseForDiff(patch []byte, tracer debugtracer.DebugTracer) (*vcs.BaseCommit, error) { - return ops.Git.BaseForDiff(patch, tracer) + list, err := ops.Git.BaseForDiff(patch, tracer) + if len(list) == 0 || err != nil { + return nil, err + } + return list[0], nil } |
