Documentation
¶
Overview ¶
Package lazycommit wraps some git commands to provide the core functionality of lazycommit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶ added in v0.2.0
type Repo string
Repo is a path to a git repository. Used to call the "git" command on the repository.
func (Repo) Commit ¶ added in v0.2.0
Commit commits all changes in the repository.
It returns the output of the commit command.
func (Repo) CommitMsg ¶ added in v0.2.0
CommitMsg builds a commit message using the tracked files in the repository.
func (Repo) NoStaged ¶ added in v0.2.0
NoStaged checks if there are no staged changes (added files, changed files, removed files) in the repository.
func (Repo) Status ¶ added in v0.2.0
func (repo Repo) Status() ([]StatusRecord, error)
Status gets and parses the repo's status.
type StatusRecord ¶ added in v0.2.0
type StatusRecord struct { // Staged is the staged status of the file. Staged rune // Unstaged is the unstaged status of the file. Unstaged rune // Path is the path to the file. Path string // Src is the original path for a rename or copy. Src string }
StatusRecord represents a single status record from "git status".
func (StatusRecord) Message ¶ added in v0.2.0
func (s StatusRecord) Message() string
Message returns a human-readable message usable for a commit message.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
git-lazy-commit
command
|
|
pkg
|
|
fileutils
Package file provides utilities for working with files.
|
Package file provides utilities for working with files. |