Documentation
¶
Index ¶
- func ComputeRepoSHAV1(ctx context.Context, repoDir, repoSHAIn string, inputTree ...string) (string, error)
- func ComputeWorkspaceTreeSHA(ctx context.Context, repoDir string) (string, error)
- func EnsureCommit(ctx context.Context, repoDir, userName, userEmail, message string) (bool, error)
- func RedactError(err error, secret string) error
- func WorkspaceStatus(ctx context.Context, repoDir string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeRepoSHAV1 ¶
func ComputeRepoSHAV1(ctx context.Context, repoDir, repoSHAIn string, inputTree ...string) (string, error)
ComputeRepoSHAV1 calculates deterministic repo_sha_out for a workspace.
Algorithm:
- Stage workspace snapshot in a temporary git index (no ref mutations).
- Compute snapshot tree hash.
- If snapshot tree == repo_sha_in tree, return repo_sha_in.
- Otherwise compute synthetic commit hash from fixed metadata.
Optional inputTree may be supplied by caller when repo_sha_in is synthetic and not resolvable as a local git object.
func ComputeWorkspaceTreeSHA ¶
ComputeWorkspaceTreeSHA computes a stable tree hash for the current workspace using a temporary index with pure Git staging semantics.
func EnsureCommit ¶
EnsureCommit stages and commits all changes in the repository when any exist. Returns true when a commit was created.
func RedactError ¶
RedactError replaces any occurrence of the secret in error messages with [REDACTED]. It handles literal, query-escaped, and path-escaped variants.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.