hook

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistingHookIsThirdParty

func ExistingHookIsThirdParty() (bool, error)

ExistingHookIsThirdParty checks if a hook file exists that was NOT installed by ai-commit.

func HookPath

func HookPath() (string, error)

HookPath returns the full path to the prepare-commit-msg hook file.

func HookScript

func HookScript() string

HookScript returns the shell script content for the prepare-commit-msg hook.

func HooksDir

func HooksDir() (string, error)

HooksDir returns the path to the git hooks directory for the current repo.

func Install

func Install(overwrite bool) error

Install writes the hook script. Returns an error if a third-party hook exists and overwrite is false.

func IsInstalled

func IsInstalled() (bool, error)

IsInstalled checks whether an ai-commit-managed hook exists.

func Uninstall

func Uninstall() error

Uninstall removes the hook, but only if it was installed by ai-commit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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