GetCommitRangeLabel returns a label like "abc123...def456" for display
(repoPath, fromCommit, toCommit string)
| 198 | |
| 199 | // GetCommitRangeLabel returns a label like "abc123...def456" for display |
| 200 | func 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 | } |