isBranchRef returns true when the ref is a branch name — i.e. it is neither a semantic-version tag nor a full commit SHA.
(ref string)
| 832 | // isBranchRef returns true when the ref is a branch name — i.e. it is |
| 833 | // neither a semantic-version tag nor a full commit SHA. |
| 834 | func isBranchRef(ref string) bool { |
| 835 | return !isSemanticVersionTag(ref) && !IsCommitSHA(ref) |
| 836 | } |
| 837 | |
| 838 | // shortRef abbreviates a ref for display. Commit SHAs are truncated to 7 characters; |
| 839 | // other refs (branch names, tags) are returned as-is. |