Skip to content

Commit

Permalink
pkg/vcs: add freebsd
Browse files Browse the repository at this point in the history
This is currently identical to support for OpenBSD and NetBSD.  A
FreeBSD git repo is available at github.com/freebsd/freebsd.
  • Loading branch information
markjdb authored and dvyukov committed Mar 12, 2019
1 parent b4e5a74 commit 2806a92
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions pkg/vcs/freebsd.go
@@ -0,0 +1,31 @@
// Copyright 2019 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package vcs

import (
"fmt"
"io"
)

type freebsd struct {
*git
}

func newFreeBSD(vm, dir string) *freebsd {
return &freebsd{
git: newGit(dir),
}
}

func (ctx *freebsd) ExtractFixTagsFromCommits(baseCommit, email string) ([]*Commit, error) {
return ctx.git.ExtractFixTagsFromCommits(baseCommit, email)
}

func (ctx *freebsd) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Commit, error) {
return nil, fmt.Errorf("not implemented for freebsd")
}

func (ctx *freebsd) PreviousReleaseTags(commit string) ([]string, error) {
return nil, fmt.Errorf("not implemented for freebsd")
}
2 changes: 2 additions & 0 deletions pkg/vcs/vcs.go
Expand Up @@ -90,6 +90,8 @@ func NewRepo(os, vm, dir string) (Repo, error) {
return newOpenBSD(vm, dir), nil
case "netbsd":
return newNetBSD(vm, dir), nil
case "freebsd":
return newFreeBSD(vm, dir), nil
}
return nil, fmt.Errorf("vcs is unsupported for %v", os)
}
Expand Down

0 comments on commit 2806a92

Please sign in to comment.