repository

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

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

View Source
const DefaultRemote = "origin"

DefaultRemote is the default remote name used for Git operations.

Variables

View Source
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.

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.

Jump to

Keyboard shortcuts

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