Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeMerkle ¶
ComputeMerkle builds a Merkle tree from the provided files and their contents, returning the hex-encoded root hash. The same inputs always produce the same hash; changing any file path or its content produces a different hash. Returns an empty string when files is empty.
func InstallHook ¶
InstallHook installs (or appends to) the post-commit git hook in root so that stacklit regenerates its output on every commit.
- If .git/hooks/ does not exist, an error is returned.
- If the hook already contains "stacklit", it is left unchanged.
- If the hook exists but lacks "stacklit", the script is appended.
- If the hook does not exist, it is created with mode 0755.
Types ¶
type Activity ¶
type Activity struct {
HotFiles []FileActivity `json:"hot_files"`
RecentFiles []string `json:"recent"`
StableFiles []string `json:"stable"`
}
Activity summarises recent git churn for a repository.
type FileActivity ¶
FileActivity records how many commits touched a file in a time window.
Click to show internal directories.
Click to hide internal directories.