git

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubCmdPrefix = "git-"
)

Variables

This section is empty.

Functions

func Commit

func Commit(msg []byte, opts *Options) (string, error)

func ExecPath

func ExecPath() (string, error)

func InitSubCmd

func InitSubCmd(src, subname string) (string, error)

func IsGitRepo

func IsGitRepo() (bool, error)

func WorkingTreeRoot

func WorkingTreeRoot() (path string, err error)

WorkingTreeRoot return path of the top-level directory of the working tree

Types

type Options

type Options struct {
	Quiet   bool
	Verbose bool
	SignOff bool
	All     bool
	Amend   bool
	DryRun  bool
	Author  string
	Date    string
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(f *pflag.FlagSet)

func (*Options) Combine added in v1.2.0

func (o *Options) Combine(filename string) []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL