aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/bug_actions.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/bug/bug_actions.go b/bug/bug_actions.go
index 31e9c07d..f9e6d0c6 100644
--- a/bug/bug_actions.go
+++ b/bug/bug_actions.go
@@ -14,6 +14,8 @@ const MsgMergeInvalid = "invalid data"
const MsgMergeUpdated = "updated"
const MsgMergeNothing = "nothing to do"
+// Fetch retrieve update from a remote
+// This does not change the local bugs state
func Fetch(repo repository.Repo, remote string) (string, error) {
remoteRefSpec := fmt.Sprintf(bugsRemoteRefPattern, remote)
fetchRefSpec := fmt.Sprintf("%s*:%s*", bugsRefPattern, remoteRefSpec)
@@ -21,12 +23,15 @@ func Fetch(repo repository.Repo, remote string) (string, error) {
return repo.FetchRefs(remote, fetchRefSpec)
}
+// Push update a remote with the local changes
func Push(repo repository.Repo, remote string) (string, error) {
return repo.PushRefs(remote, bugsRefPattern+"*")
}
-// TODO: return a chan of changes for the cache to be updated properly
+// Pull does a Fetch and merge the updates into the local bug states
func Pull(repo repository.Repo, out io.Writer, remote string) error {
+ // TODO: return a chan of changes for the cache to be updated properly
+
if out == nil {
out = ioutil.Discard
}