gitstatus

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(ctx context.Context, repoPath string, opts *ExtractOptions, ignorePatterns []gitignore.Pattern) (*models.GitStatus, error)

Extract retrieves Git status information for a single repository.

func ExtractBatch

func ExtractBatch(
	ctx context.Context, repos map[string]*models.Repository, opts *ExtractOptions,
) *models.BatchResult

ExtractBatch extracts Git status for multiple repositories concurrently.

Types

type ExtractOptions

type ExtractOptions struct {
	// Timeout is the maximum time to spend extracting status for a single repository
	Timeout time.Duration

	// MaxConcurrency limits the number of repositories processed concurrently in ExtractBatch
	MaxConcurrency int

	// Debug enables debug output for status extraction operations
	Debug bool

	// Fetch enables fetching from origin remote before calculating ahead/behind counts
	Fetch bool

	// FetchRetries is the number of retry attempts for failed fetch operations
	FetchRetries int
}

ExtractOptions configures the Git status extraction behavior.

func DefaultOptions

func DefaultOptions() *ExtractOptions

DefaultOptions returns sensible default options.

type FetchResult added in v0.7.0

type FetchResult struct {
	Success bool
	Skipped bool
	Error   error
	Retries int
}

FetchResult represents the result of a fetch operation.

Jump to

Keyboard shortcuts

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