Documentation
¶
Index ¶
- Constants
- func Commit(ctx context.Context, wd string, msg io.Reader, args ...string) error
- func CommitsBetween(ctx context.Context, wd string, refRange []string) (iter.Seq2[string, error], error)
- func DiffsOfCommit(ctx context.Context, wd, ref, target string, dst io.Writer) error
- func HeadHash(ctx context.Context, wd string) (string, error)
- func Init(ctx context.Context, wd string, out io.Writer) error
- func ListCommitChanges(ctx context.Context, wd, ref string) (iter.Seq2[string, error], error)
- func ListStaged(ctx context.Context, wd string) (iter.Seq2[string, error], error)
- func RootCommit(ctx context.Context, wd string) (string, error)
- func ShowCommit(ctx context.Context, wd, ref string, dst io.Writer) error
- func StagedDiffs(ctx context.Context, wd, target string, dst io.Writer) error
- func Status(ctx context.Context, wd string, target string) (iter.Seq2[string, error], string, error)
- type CommitFormat
Constants ¶
const ( CommitFormatGithub = CommitFormat("github") CommitFormatConventional = CommitFormat("conventional") )
Variables ¶
This section is empty.
Functions ¶
func CommitsBetween ¶
func CommitsBetween( ctx context.Context, wd string, refRange []string, ) (iter.Seq2[string, error], error)
CommitsBetween the provided refRange
This provides an iterator to step through the commits in the range.
refRange is expected to have...
[0] = start [1] = end
If a single ref is provided, that will be the only commit returned by the iterator.
func DiffsOfCommit ¶
DiffsOfCommit writes the git patch of changes made to the target pathspec at the provided ref.
func ListCommitChanges ¶
ListCommitChanges provides an iterator to step through the changes to each file committed at ref.
func ListStaged ¶
ListStaged provides an iterator to step through each file that currently has staged changes.
func RootCommit ¶
RootCommit hash of the git repo at wd.
func ShowCommit ¶
ShowCommit identified by ref at the git repo at wd
stdout will be piped to the dst.
func StagedDiffs ¶
StagedDiffs writes the staged diffs of target to the dst.
Types ¶
type CommitFormat ¶
type CommitFormat string