diff options
author | Michael Muré <batolettre@gmail.com> | 2021-02-05 11:18:38 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-02-14 12:19:01 +0100 |
commit | e35c7c4d170d1b682992c95f1c14772158501015 (patch) | |
tree | fdebdffa3e531ca3494c66627ba3396214a792d9 /repository/repo.go | |
parent | fe4237df3c62bd6dfd1f385893295f93072d0e51 (diff) | |
download | git-bug-e35c7c4d170d1b682992c95f1c14772158501015.tar.gz |
entity: more testing and bug fixing
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/repository/repo.go b/repository/repo.go index c31afa22..8d162c6d 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -100,11 +100,18 @@ type Commit struct { // RepoData give access to the git data storage type RepoData interface { - // FetchRefs fetch git refs from a remote - FetchRefs(remote string, refSpec string) (string, error) - - // PushRefs push git refs to a remote - PushRefs(remote string, refSpec string) (string, error) + // FetchRefs fetch git refs matching a directory prefix to a remote + // Ex: prefix="foo" will fetch any remote refs matching "refs/foo/*" locally. + // The equivalent git refspec would be "refs/foo/*:refs/remotes/<remote>/foo/*" + FetchRefs(remote string, prefix string) (string, error) + + // PushRefs push git refs matching a directory prefix to a remote + // Ex: prefix="foo" will push any local refs matching "refs/foo/*" to the remote. + // The equivalent git refspec would be "refs/foo/*:refs/foo/*" + // + // Additionally, PushRefs will update the local references in refs/remotes/<remote>/foo to match + // the remote state. + PushRefs(remote string, prefix string) (string, error) // StoreData will store arbitrary data and return the corresponding hash StoreData(data []byte) (Hash, error) |