{"modulePath":"github.com/chpock/gen-commit-msg","version":"v0.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package git\n\n## Constants\n\n```go\nconst (\n\tMaxContextOutputBytes    = 200000\n\tRecentCommitMessageCount = 15\n)\n```\n\n## Functions\n\n```go\nfunc HasStagedFiles() (bool, error)\n```\n\n```go\nfunc InstructionPaths(ctx context.Context, dir string) (string, []string, error)\n```\nInstructionPaths returns the worktree root and root-relative staged paths. Disabling rename detection includes both the removed and added path.\n\n```go\nfunc IsRepo() bool\n```\n\n## Types\n\n```go\ntype CommandOutput struct {\n\tID          string      `json:\"id\"`\n\tCommand     []string    `json:\"command\"`\n\tDescription string      `json:\"description\"`\n\tRequired    bool        `json:\"required\"`\n\tOutput      string      `json:\"output\"`\n\tStderr      string      `json:\"stderr\"`\n\tExitCode    int         `json:\"exit_code\"`\n\tTruncated   bool        `json:\"truncated\"`\n\tTruncation  *Truncation `json:\"truncation,omitempty\"`\n}\n```\n\n```go\ntype CommitMessageContext struct {\n\tFormatVersion string         `json:\"format_version\"`\n\tStagedChanges ContextSection `json:\"staged_changes\"`\n\tStyleContext  ContextSection `json:\"style_context\"`\n}\n```\n\n```go\nfunc CollectCommitMessageContext(ctx context.Context) (CommitMessageContext, error)\n```\n\n```go\nfunc (c CommitMessageContext) Marshal() (string, error)\n```\n\n```go\ntype ContextSection struct {\n\tOutputs []CommandOutput `json:\"outputs\"`\n}\n```\n\n```go\ntype Truncation struct {\n\tMaxBytes      int    `json:\"max_bytes\"`\n\tOriginalBytes int    `json:\"original_bytes\"`\n\tKeptBytes     int    `json:\"kept_bytes\"`\n\tStrategy      string `json:\"strategy\"`\n}\n```\n\n","path":"github.com/chpock/gen-commit-msg/internal/git","name":"git","synopsis":"","isRedistributable":true}
