MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / GetCommitRangeLabel

Function GetCommitRangeLabel

vcs/git/git.go:200–210  ·  view source on GitHub ↗

GetCommitRangeLabel returns a label like "abc123...def456" for display

(repoPath, fromCommit, toCommit string)

Source from the content-addressed store, hash-verified

198
199// GetCommitRangeLabel returns a label like "abc123...def456" for display
200func GetCommitRangeLabel(repoPath, fromCommit, toCommit string) (string, error) {
201 fromShort, err := GetShortCommitHash(repoPath, fromCommit)
202 if err != nil {
203 return "", err
204 }
205 toShort, err := GetShortCommitHash(repoPath, toCommit)
206 if err != nil {
207 return "", err
208 }
209 return fmt.Sprintf("%s...%s", fromShort, toShort), nil
210}

Calls 1

GetShortCommitHashFunction · 0.85