MCPcopy Create free account
hub / github.com/git-bug/git-bug / RefToId

Function RefToId

entity/refs.go:17–20  ·  view source on GitHub ↗

RefToId parse a git reference and return the corresponding Entity's Id.

(ref string)

Source from the content-addressed store, hash-verified

15
16// RefToId parse a git reference and return the corresponding Entity's Id.
17func RefToId(ref string) Id {
18 split := strings.Split(ref, "/")
19 return Id(split[len(split)-1])
20}

Callers 3

readFunction · 0.92
mergeFunction · 0.92
RefsToIdsFunction · 0.85

Calls 1

IdTypeAlias · 0.85

Tested by

no test coverage detected