git

package
v0.23.9 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package git owns git CLI interaction for initech project bootstrap. It handles repo initialization, submodule management, and commits.

All operations take an exec.Runner, making the package fully testable without a real git installation. This package does not know about config or scaffold.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubmodule

func AddSubmodule(runner iexec.Runner, repoDir, url, subPath string) error

AddSubmodule adds a git submodule at the specified path within the repo. The path is relative to the repo root (e.g., "eng1/src").

func CommitAll

func CommitAll(runner iexec.Runner, dir, message string) error

CommitAll stages all files and creates a commit with the given message. Returns an error if staging or commit fails.

func Init

func Init(runner iexec.Runner, dir string) error

Init runs git init in the given directory. If the directory already contains a .git directory, it's a no-op and returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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