diff options
author | Michael Muré <batolettre@gmail.com> | 2020-12-21 11:10:43 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-02-14 12:18:59 +0100 |
commit | 9cca74cc334df94e37f3f3c76437da9a61e53bf2 (patch) | |
tree | afa105527409fb70fd4be41e2bae82905afa53d0 /entity/entity_actions.go | |
parent | 5c4e7de01281da51e32b4926dc0ef15b17a2d397 (diff) | |
download | git-bug-9cca74cc334df94e37f3f3c76437da9a61e53bf2.tar.gz |
entity: add embryo of a generic, DAG-enabled entity
Diffstat (limited to 'entity/entity_actions.go')
-rw-r--r-- | entity/entity_actions.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/entity/entity_actions.go b/entity/entity_actions.go new file mode 100644 index 00000000..02e76487 --- /dev/null +++ b/entity/entity_actions.go @@ -0,0 +1,27 @@ +package entity + +import ( + "fmt" + + "github.com/MichaelMure/git-bug/repository" +) + +func ListLocalIds(typename string, repo repository.RepoData) ([]Id, error) { + refs, err := repo.ListRefs(fmt.Sprintf("refs/%s/", typename)) + if err != nil { + return nil, err + } + return RefsToIds(refs), nil +} + +func Fetch() { + +} + +func Pull() { + +} + +func Push() { + +} |