diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-10-29 10:33:41 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-10-29 18:02:20 +0100 |
| commit | 5fa26ec9b5e628709d1cc0217a0c5e0a43590191 (patch) | |
| tree | c254e9e5d3e73e99be8f385a3ae800d58c09f5f7 /pkg/vcs/git.go | |
| parent | 1c1aefffdaaaea2acc1c36145b0a26c4593a2a41 (diff) | |
tools/syz-kconf: detect -rcN tags
We currently detect v5.10-rc1 as v5.9 because we ignore -rc tags.
This makes it impossible to enable configs that were already added for v5.10.
Treat v5.10-rc1 as v5.10 already.
Diffstat (limited to 'pkg/vcs/git.go')
| -rw-r--r-- | pkg/vcs/git.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go index aeb9d734d..5b1efa33a 100644 --- a/pkg/vcs/git.go +++ b/pkg/vcs/git.go @@ -503,7 +503,7 @@ func (git *git) bisectInconclusive(output []byte) ([]*Commit, error) { } func (git *git) ReleaseTag(commit string) (string, error) { - tags, err := git.previousReleaseTags(commit, true, true) + tags, err := git.previousReleaseTags(commit, true, true, true) if err != nil { return "", err } @@ -513,14 +513,14 @@ func (git *git) ReleaseTag(commit string) (string, error) { return tags[0], nil } -func (git *git) previousReleaseTags(commit string, self, onlyTop bool) ([]string, error) { +func (git *git) previousReleaseTags(commit string, self, onlyTop, includeRC bool) ([]string, error) { var tags []string if self { output, err := git.git("tag", "--list", "--points-at", commit, "--merged", commit, "v*.*") if err != nil { return nil, err } - tags = gitParseReleaseTags(output) + tags = gitParseReleaseTags(output, includeRC) if onlyTop && len(tags) != 0 { return tags, nil } @@ -529,7 +529,7 @@ func (git *git) previousReleaseTags(commit string, self, onlyTop bool) ([]string if err != nil { return nil, err } - tags1 := gitParseReleaseTags(output) + tags1 := gitParseReleaseTags(output, includeRC) tags = append(tags, tags1...) if len(tags) == 0 { return nil, fmt.Errorf("no release tags found for commit %v", commit) @@ -538,11 +538,11 @@ func (git *git) previousReleaseTags(commit string, self, onlyTop bool) ([]string } func (git *git) IsRelease(commit string) (bool, error) { - tags1, err := git.previousReleaseTags(commit, true, false) + tags1, err := git.previousReleaseTags(commit, true, false, false) if err != nil { return false, err } - tags2, err := git.previousReleaseTags(commit, false, false) + tags2, err := git.previousReleaseTags(commit, false, false, false) if err != nil { return false, err } |
