Documentation ¶
Overview ¶
Package config storage is the implementation of git config for go-git
Index ¶
- Constants
- Variables
- func MatchAny(l []RefSpec, n plumbing.ReferenceName) bool
- type Config
- type ConfigStorer
- type RefSpec
- func (s RefSpec) Dst(n plumbing.ReferenceName) plumbing.ReferenceName
- func (s RefSpec) IsDelete() bool
- func (s RefSpec) IsForceUpdate() bool
- func (s RefSpec) IsValid() bool
- func (s RefSpec) IsWildcard() bool
- func (s RefSpec) Match(n plumbing.ReferenceName) bool
- func (s RefSpec) Src() string
- func (s RefSpec) String() string
- type RemoteConfig
Constants ¶
const ( // DefaultFetchRefSpec is the default refspec used for fetch. DefaultFetchRefSpec = "+refs/heads/*:refs/remotes/%s/*" // DefaultPushRefSpec is the default refspec used for push. DefaultPushRefSpec = "refs/heads/*:refs/heads/*" )
Variables ¶
Functions ¶
func MatchAny ¶
func MatchAny(l []RefSpec, n plumbing.ReferenceName) bool
MatchAny returns true if any of the RefSpec match with the given ReferenceName
Types ¶
type Config ¶
type Config struct { Core struct { IsBare bool } Remotes map[string]*RemoteConfig }
Config contains the repository configuration
type ConfigStorer ¶
ConfigStorer generic storage of Config object
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 plumbing.ReferenceName) plumbing.ReferenceName
Dst returns the destination for the given remote reference
func (RefSpec) IsDelete ¶
IsDelete returns true if the refspec indicates a delete (empty src).
func (RefSpec) IsForceUpdate ¶
IsForceUpdate returns if update is allowed in non fast-forward merges
func (RefSpec) IsWildcard ¶
IsWildcard returns true if the RefSpec contains a wildcard
func (RefSpec) Match ¶
func (s RefSpec) Match(n plumbing.ReferenceName) bool
Match match the given plumbing.ReferenceName against the source