Documentation ¶
Overview ¶
Package config storage is the implementation of git config for go-git
Index ¶
Constants ¶
View Source
const (
DefaultRefSpec = "+refs/heads/*:refs/remotes/%s/*"
)
Variables ¶
Functions ¶
Types ¶
type ConfigStorage ¶
type ConfigStorage interface { Remote(name string) (*RemoteConfig, error) Remotes() ([]*RemoteConfig, error) SetRemote(*RemoteConfig) error DeleteRemote(name string) error }
type RefSpec ¶
type RefSpec string
RefSpec is a mapping from local branches to remote references The format of the refspec is an optional +, followed by <src>:<dst>, where <src> is the pattern for references on the remote side and <dst> is where those references will be written locally. The + tells Git to update the reference even if it isn’t a fast-forward. eg.: "+refs/heads/*:refs/remotes/origin/*"
https://git-scm.com/book/es/v2/Git-Internals-The-Refspec
func (RefSpec) Dst ¶
func (s RefSpec) Dst(n core.ReferenceName) core.ReferenceName
Dst returns the destination for the given remote reference
func (RefSpec) IsForceUpdate ¶
IsForceUpdate returns if update is allowed in non fast-forward merges
type RemoteConfig ¶
func (*RemoteConfig) Validate ¶
func (c *RemoteConfig) Validate() error
Validate validate the fields and set the default values
Click to show internal directories.
Click to hide internal directories.