Documentation
¶
Index ¶
- func AbortMerge() error
- func Add(file string, options ...string) error
- func CheckStatus() error
- func Checkout(args ...string) error
- func ForEachLine(cmd *exec.Cmd, f func(string) error) error
- func Output(cmd *exec.Cmd) (str string, err error)
- func OutputBytes(cmd *exec.Cmd) (b []byte, err error)
- func OutputLines(cmd *exec.Cmd) (output []string)
- func OutputString(cmd *exec.Cmd) string
- func RemoveUntracked() error
- func Run(cmd Runner) error
- func RunCmd(cmd *Cmd) (err error)
- func RunExecCmd(cmd *exec.Cmd) (err error)
- func SymbolicRef(ref string) string
- type Cmd
- func (c *Cmd) AddArg(arg string)
- func (c *Cmd) AddArgs(args ...string)
- func (c *Cmd) AddOption(name string, args ...string)
- func (c *Cmd) AllArgs() []string
- func (c *Cmd) Build() *exec.Cmd
- func (c *Cmd) ForEachLine(f func(string) error) error
- func (c *Cmd) Output() (string, error)
- func (c *Cmd) OutputBytes() ([]byte, error)
- func (c *Cmd) OutputLines() []string
- func (c *Cmd) OutputString() string
- func (c *Cmd) Run() error
- type CommitSha
- type MergeCmd
- func (m *MergeCmd) Abort() error
- func (m *MergeCmd) AddStrategyOption(option string)
- func (m *MergeCmd) Build() *exec.Cmd
- func (m *MergeCmd) Commit()
- func (m *MergeCmd) FFOnly()
- func (m *MergeCmd) FindRenames(percent int)
- func (m *MergeCmd) IgnoreAllSpace()
- func (m *MergeCmd) NoCommit()
- func (m *MergeCmd) Run() error
- type MergeStrategy
- type Ref
- func (r Ref) Checkout() error
- func (r Ref) Delete() error
- func (r Ref) IsEmpty() bool
- func (r Ref) Merge() *MergeCmd
- func (r Ref) Reset() Reset
- func (r Ref) ShortName() string
- func (r Ref) ShortSha() string
- func (r Ref) String() string
- func (r Ref) SymbolicName() string
- func (r Ref) TreeRef() string
- func (r *Ref) Update() (err error)
- type RefInfo
- type RefName
- type Reset
- type RevParse
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortMerge ¶
func AbortMerge() error
func CheckStatus ¶
func CheckStatus() error
func OutputLines ¶
func OutputString ¶
func RemoveUntracked ¶
func RemoveUntracked() error
func RunExecCmd ¶
func SymbolicRef ¶
Types ¶
type Cmd ¶
func CheckoutCmd ¶
func (*Cmd) OutputBytes ¶
func (*Cmd) OutputLines ¶
func (*Cmd) OutputString ¶
type MergeCmd ¶
type MergeCmd struct {
Strategy MergeStrategy
StrategyOptions []string
MergeRef string
// contains filtered or unexported fields
}
func (*MergeCmd) AddStrategyOption ¶
func (*MergeCmd) FindRenames ¶ added in v0.3.1
func (*MergeCmd) IgnoreAllSpace ¶
func (m *MergeCmd) IgnoreAllSpace()
type MergeStrategy ¶ added in v0.3.1
type MergeStrategy int
const ( NONE MergeStrategy = iota THEIRS OURS )
func GetStrategy ¶ added in v0.3.1
func GetStrategy(str string) MergeStrategy
func (*MergeStrategy) AddTo ¶ added in v0.3.1
func (s *MergeStrategy) AddTo(f *pflag.FlagSet) *pflag.Flag
func (MergeStrategy) MarshalJSON ¶ added in v0.3.1
func (s MergeStrategy) MarshalJSON() ([]byte, error)
Json
func (MergeStrategy) Option ¶ added in v0.3.1
func (s MergeStrategy) Option() string
func (*MergeStrategy) Set ¶ added in v0.3.1
func (s *MergeStrategy) Set(val string) error
func (MergeStrategy) String ¶ added in v0.3.1
func (s MergeStrategy) String() string
func (MergeStrategy) Type ¶ added in v0.3.1
func (s MergeStrategy) Type() string
type Ref ¶
func (Ref) SymbolicName ¶
type RefInfo ¶
type RefInfo struct {
Type string
Author string
AuthorEmail string
FullName string
ShortName string
RefName string
Push string
Upstream string
}
func GetBranchInfo ¶
func GetRefInfo ¶
type RefName ¶
func ParseRefName ¶
type RevParse ¶
type RevParse string
func (RevParse) OutputString ¶
func (RevParse) SymbolicFullName ¶
type Runner ¶
type Runner interface {
Run() error
}
func ResolveCheckoutCmd ¶
func ResolveCheckoutCmd(file string, s MergeStrategy) Runner
func ResolveRmCmd ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.