Documentation
¶
Overview ¶
Package repos implements git operations fanned out across multiple repository directories.
The simple fan-out methods each prepend their git sub-command and delegate to the fanout worker pool, bounded by an invocation override or their default limit. They carry no individual doc comments.
Index ¶
- Constants
- type DiffConfig
- type Repos
- func (r *Repos) Branches(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) CheckoutRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) CloneRepos(ctx context.Context, baseDir string) ([]*ctxhelper.Repository, error)
- func (r *Repos) CommitRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) DiffRepos(ctx context.Context, dirs []string, cfg *DiffConfig) error
- func (r *Repos) FetchRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) GetBranchAndTagNames(ctx context.Context, dirs []string) ([]string, error)
- func (r *Repos) GetBranchNames(ctx context.Context, dirs []string) ([]string, error)
- func (r *Repos) GetRemoteNames(ctx context.Context, dirs []string) ([]string, error)
- func (r *Repos) GetRepos(ctx context.Context, name string) ([]*github.Repository, error)
- func (r *Repos) GetTagNames(ctx context.Context, dirs []string) ([]string, error)
- func (r *Repos) ListBranches(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) ListTags(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error
- func (r *Repos) LogRepos(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error
- func (r *Repos) MergeRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) PullRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) PushRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) ResetRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) RunAlias(ctx context.Context, dirs []string, name string, args ...string) error
- func (r *Repos) StageFiles(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) StashRepos(ctx context.Context, dirs []string, args ...string) error
- func (r *Repos) StatusRepos(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error
- func (r *Repos) TagRepos(ctx context.Context, dirs []string, args ...string) error
Constants ¶
const ( DefaultCheckoutConcurrency = 50 DefaultPullConcurrency = 25 DefaultFetchConcurrency = 25 DefaultPushConcurrency = 25 DefaultCloneConcurrency = 10 DefaultLocalConcurrency = 50 )
Default limits for operations run through the worker pool when no override is set.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffConfig ¶
type DiffConfig struct {
IgnoreEmpty bool
IgnoreFilePrefix []string
MatchExtension []string
Args []string
}
DiffConfig controls filtering and output options for DiffRepos.
type Repos ¶
type Repos struct {
// contains filtered or unexported fields
}
Repos holds the scribe, GitHub client, and rate limiter shared by all operations.
func (*Repos) CheckoutRepos ¶
func (*Repos) CloneRepos ¶
CloneRepos clones every repository in the context's repo map that is not already present, returning those cloned successfully.
func (*Repos) CommitRepos ¶
func (*Repos) FetchRepos ¶
func (*Repos) GetBranchAndTagNames ¶
func (*Repos) GetBranchNames ¶
func (*Repos) GetRemoteNames ¶
func (*Repos) GetTagNames ¶
func (*Repos) ListBranches ¶
func (*Repos) MergeRepos ¶
func (*Repos) ResetRepos ¶
func (*Repos) RunAlias ¶ added in v0.0.6
RunAlias runs one repository at a time because aliases may be order-sensitive and their arguments leave no room for a concurrency override.