Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneInto ¶
CloneInto clones/fetches repo@ref into cacheDir/repo and checks out the ref in the workdir. Returns the workdir path with the working tree set to the requested ref (detached HEAD).
func GetCurrentCommitHash ¶ added in v0.7.0
GetCurrentCommitHash returns the commit hash of the currently checked out ref in the given directory. Returns the full 40-character SHA-1 hash.
func GetRemoteCommitHash ¶ added in v0.7.0
GetRemoteCommitHash fetches the remote ref and returns its commit hash without checking it out. This function is used to check if the remote has changed since the last cache. If network fails, returns an error that can be handled gracefully by the caller.
func IsCommitHash ¶ added in v0.7.0
IsCommitHash checks if the given ref is already a commit hash (40-character hex string). This is used to validate configuration - if ref is already a commit hash, commit hash tracking doesn't make sense since commit hashes don't change.
Types ¶
This section is empty.