Documentation
¶
Overview ¶
Package repository provides Git repository management functionality for CM.
Package repository provides repository management functionality and error definitions.
Package repository provides Git repository management functionality for CM.
Index ¶
Constants ¶
const DefaultRemote = "origin"
DefaultRemote is the default remote name used for Git operations.
Variables ¶
var ( // Git repository errors. ErrGitRepositoryNotFound = errors.New("not a valid Git repository: .git directory not found") ErrGitRepositoryInvalid = errors.New("git repository is in an invalid state") ErrNotAGitRepository = errors.New("not a Git repository: .git directory not found") // Worktree errors. ErrWorktreeExists = errors.New("worktree already exists") ErrWorktreeNotInStatus = errors.New("worktree not found in status file") // Repository state errors. ErrRepositoryNotClean = errors.New("repository is not clean") ErrDirectoryExists = errors.New("directory already exists") // User interaction errors. ErrDeletionCancelled = errors.New("deletion cancelled by user") // Remote errors. ErrOriginRemoteNotFound = errors.New("origin remote not found or invalid") ErrOriginRemoteInvalidURL = errors.New("origin remote URL is not a valid Git hosting service URL") )
Error definitions for repository package.
Functions ¶
This section is empty.
Types ¶
type CreateWorktreeOpts ¶
type CreateWorktreeOpts = interfaces.CreateWorktreeOpts
CreateWorktreeOpts contains optional parameters for worktree creation in repository mode.
type LoadWorktreeOpts ¶
type LoadWorktreeOpts = interfaces.LoadWorktreeOpts
LoadWorktreeOpts contains optional parameters for LoadWorktree.
type NewRepositoryParams ¶
type NewRepositoryParams = interfaces.NewRepositoryParams
NewRepositoryParams contains parameters for creating a new Repository instance.
type Repository ¶
type Repository = interfaces.Repository
Repository interface provides repository management capabilities. This interface is now defined in pkg/mode/repository/interfaces to avoid circular imports.
func NewRepository ¶
func NewRepository(params NewRepositoryParams) Repository
NewRepository creates a new Repository instance.
type StatusParams ¶
type StatusParams = interfaces.StatusParams
StatusParams contains parameters for status operations.
type ValidationParams ¶
type ValidationParams = interfaces.ValidationParams
ValidationParams contains parameters for repository validation.
type ValidationResult ¶
type ValidationResult = interfaces.ValidationResult
ValidationResult contains the result of repository validation.
Source Files
¶
- add_worktree_to_status.go
- create_worktree.go
- delete_all_worktrees.go
- delete_worktree.go
- errors.go
- handle_remote_management.go
- is_git_repository.go
- list_worktrees.go
- load_worktree.go
- repository.go
- validate.go
- validate_git_configuration.go
- validate_git_status.go
- validate_origin_remote.go
- validate_repository.go
- validate_worktree_exists.go
Directories
¶
Path | Synopsis |
---|---|
Package interfaces defines the repository interface for dependency injection.
|
Package interfaces defines the repository interface for dependency injection. |
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |