hooks

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const COMMIT_MSG_HOOK = "commit-msg"
View Source
const FAILED_EXIT_CODE = 65 // EX_DATAERR - hooks didn't pass
View Source
const NOTHING_STAGED_EXIT_CODE = 66 // EX_NOINPUT
View Source
const PRE_COMMIT_HOOK = "pre-commit"
View Source
const PRE_COMMIT_MUTATING_HOOK = "pre-commit-mutating"

Variables

View Source
var PRE_COMMIT_GIT_SHIM string

Functions

This section is empty.

Types

type CommitMsg added in v1.0.0

type CommitMsg struct {
	Repo *repo.Repo
}

func (*CommitMsg) Run added in v1.5.0

func (hook *CommitMsg) Run(messageFile string) error

type PreCommit

type PreCommit struct {
	Repo *repo.Repo
}

func (*PreCommit) Run added in v1.5.0

func (hook *PreCommit) Run(argsFiles []string) error

argsFiles can be non-empty with the files passed in by the user when manually running this hook, or it can be empty and the list of files will be retrieved from Git.

Jump to

Keyboard shortcuts

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