commit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	//    usage: git commit [<options>] [--] <pathspec>...
	//
	//    -q, --quiet           suppress summary after successful commit
	Quiet bool
	//    -v, --verbose         show diff in commit message template
	Verbose bool
	//
	//Commit message options
	//    -F, --file <file>     read message from file
	//    --author <author>     override author for commit
	Author string
	//    --date <date>         override date for commit
	Date string
	//    -m, --message <message>
	//                          commit message
	//    -c, --reedit-message <commit>
	//                          reuse and edit message from specified commit
	//    -C, --reuse-message <commit>
	//                          reuse message from specified commit
	//    --fixup <commit>      use autosquash formatted message to fixup specified commit
	//    --squash <commit>     use autosquash formatted message to squash specified commit
	//    --reset-author        the commit is authored by me now (used with -C/-c/--amend)
	//    -s, --signoff         add Signed-off-by:
	//    -t, --template <file>
	//                          use specified template file
	//    -e, --edit            force edit of commit
	//    --cleanup <default>   how to strip spaces and #comments from message
	//    --status              include status in commit message template
	//    -S, --gpg-sign[=<key-id>]
	//                          GPG sign commit
	//
	//Commit contents options
	//    -a, --all             commit all changed files
	All bool
	//    -i, --include         add specified files to index for commit
	//    --interactive         interactively add files
	//    -p, --patch           interactively add changes
	//    -o, --only            commit only specified files
	//    -n, --no-verify       bypass pre-commit and commit-msg hooks
	//    --dry-run             show what would be committed
	//    --short               show status concisely
	//    --branch              show branch information
	//    --ahead-behind        compute full ahead/behind values
	//    --porcelain           machine-readable output
	//    --long                show status in long format (default)
	//    -z, --null            terminate entries with NUL
	//    --amend               amend previous commit
	Amend bool
}

func NewDefaultArgs

func NewDefaultArgs() *Args

func (Args) Combination

func (args Args) Combination(commitMsg string) (rawArgs []string)

type Commitment

type Commitment interface {
	Setup(config.Config) error
	Read() (string, error)
	Execute(*Args) error
}

Commitment checks git-commit-message

func New

func New() Commitment

New returns a empty Commitment

Jump to

Keyboard shortcuts

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