package gitutil
import "github.com/docker/buildx/util/gitutil"
Index ¶
- func GitAdd(c *Git, tb testing.TB, files ...string)
- func GitCheckoutBranch(c *Git, tb testing.TB, name string)
- func GitCommit(c *Git, tb testing.TB, msg string)
- func GitInit(c *Git, tb testing.TB)
- func GitServeHTTP(c *Git, t testing.TB, opts ...GitServeOpt) (url string)
- func GitSetMainUpstream(c *Git, tb testing.TB, remote, target string)
- func GitSetRemote(c *Git, tb testing.TB, name string, url string)
- func GitTag(c *Git, tb testing.TB, tag string)
- func IsAmbiguousArgument(err error) bool
- func IsUnknownRevision(err error) bool
- func Mktmp(tb testing.TB) string
- type Git
- func New(opts ...Option) (*Git, error)
- func (c *Git) FullCommit() (string, error)
- func (c *Git) GitDir() (string, error)
- func (c *Git) IsDirty() bool
- func (c *Git) IsInsideWorkTree() bool
- func (c *Git) RemoteURL() (string, error)
- func (c *Git) RootDir() (string, error)
- func (c *Git) ShortCommit() (string, error)
- func (c *Git) Tag() (string, error)
- type GitServeOpt
- type Option
Functions ¶
func GitAdd ¶
func GitCheckoutBranch ¶
func GitCommit ¶
func GitInit ¶
func GitServeHTTP ¶
func GitServeHTTP(c *Git, t testing.TB, opts ...GitServeOpt) (url string)
func GitSetMainUpstream ¶
func GitSetRemote ¶
func GitTag ¶
func IsAmbiguousArgument ¶
func IsUnknownRevision ¶
func Mktmp ¶
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git represents an active git object
func New ¶
New initializes a new git client
func (*Git) FullCommit ¶
func (*Git) GitDir ¶
func (*Git) IsDirty ¶
func (*Git) IsInsideWorkTree ¶
func (*Git) RemoteURL ¶
func (*Git) RootDir ¶
func (*Git) ShortCommit ¶
func (*Git) Tag ¶
type GitServeOpt ¶
type GitServeOpt func(*gitServe)
func WithAccessToken ¶
func WithAccessToken(token string) GitServeOpt
type Option ¶
type Option func(b *Git)
Option provides a variadic option for configuring the git client.
func WithContext ¶
WithContext sets context.
func WithWorkingDir ¶
WithWorkingDir sets working directory.
Source Files ¶
gitutil.go path.go testutil.go testutilserve.go
- Version
- v0.22.0 (latest)
- Published
- Mar 17, 2025
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 3 weeks ago –
Tools for package owners.