From 7163b2283b4542a4d4abfe9a71963f122322bde7 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 8 Nov 2020 19:15:06 +0100 Subject: bug: Id from first operation data, not git + remove root link --- entity/refs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'entity/refs.go') diff --git a/entity/refs.go b/entity/refs.go index 82b1741b..f505dbf0 100644 --- a/entity/refs.go +++ b/entity/refs.go @@ -6,13 +6,13 @@ func RefsToIds(refs []string) []Id { ids := make([]Id, len(refs)) for i, ref := range refs { - ids[i] = refToId(ref) + ids[i] = RefToId(ref) } return ids } -func refToId(ref string) Id { +func RefToId(ref string) Id { split := strings.Split(ref, "/") return Id(split[len(split)-1]) } -- cgit From 8d63c983c982f93cc48d3996d6bd097ddeeb327f Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 3 Jan 2021 23:59:25 +0100 Subject: WIP --- entity/refs.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'entity/refs.go') diff --git a/entity/refs.go b/entity/refs.go index f505dbf0..070d4dba 100644 --- a/entity/refs.go +++ b/entity/refs.go @@ -2,6 +2,7 @@ package entity import "strings" +// RefsToIds parse a slice of git references and return the corresponding Entity's Id. func RefsToIds(refs []string) []Id { ids := make([]Id, len(refs)) @@ -12,6 +13,7 @@ func RefsToIds(refs []string) []Id { return ids } +// RefsToIds parse a git reference and return the corresponding Entity's Id. func RefToId(ref string) Id { split := strings.Split(ref, "/") return Id(split[len(split)-1]) -- cgit