aboutsummaryrefslogtreecommitdiffstats
path: root/commands/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/pull.go')
-rw-r--r--commands/pull.go22
1 files changed, 2 insertions, 20 deletions
diff --git a/commands/pull.go b/commands/pull.go
index ac6a3732..52b3ecd8 100644
--- a/commands/pull.go
+++ b/commands/pull.go
@@ -2,9 +2,9 @@ package commands
import (
"errors"
- "fmt"
"github.com/MichaelMure/git-bug/bug"
"github.com/spf13/cobra"
+ "os"
)
func runPull(cmd *cobra.Command, args []string) error {
@@ -17,25 +17,7 @@ func runPull(cmd *cobra.Command, args []string) error {
remote = args[0]
}
- fmt.Printf("Fetching remote ...\n\n")
-
- if err := bug.Fetch(repo, remote); err != nil {
- return err
- }
-
- fmt.Printf("\nMerging data ...\n\n")
-
- for merge := range bug.MergeAll(repo, remote) {
- if merge.Err != nil {
- return merge.Err
- }
-
- if merge.Status != bug.MsgNothing {
- fmt.Printf("%s: %s\n", merge.HumanId, merge.Status)
- }
- }
-
- return nil
+ return bug.Pull(repo, os.Stdout, remote)
}
// showCmd defines the "push" subcommand.