cleangit

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPermissionDenied = errors.New("permission denied")
	ErrNotGitRepository = errors.New("not a git repository")
	ErrHooksNotFound    = errors.New("hooks directory not found")
	ErrRemovalFailed    = errors.New("removing hooks")
	ErrUserCancelled    = errors.New("operation cancelled by user")
)

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Path            string
	GitDir          string
	ConfigPath      string
	CustomHooksPath string
	HasCustomHooks  bool
}

Repository represents a Git repository

func Scan

func Scan(ctx context.Context, rootPath string, maxDepth int) ([]Repository, error)

Scan finds Git repositories and returns those with custom hooksPath

type Result

type Result struct {
	Repository   *Repository
	Removed      bool
	PreviousPath string
	Error        error
}

Result tracks the outcome of removing hooksPath config

type Summary

type Summary struct {
	RepositoriesWithConfig int
	ConfigsRemoved         int
	Results                []Result
}

Summary contains the overall results of the clean operation

func Clean

func Clean(ctx context.Context, repos []Repository) Summary

Clean removes hooksPath configuration from repositories

Jump to

Keyboard shortcuts

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