diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-16 13:48:46 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:24 +0100 |
commit | cd7ed7ff9e3250c10e97fe16c934b5a6151527bb (patch) | |
tree | e0d6df60e2a04ccb72b3d4c63fc57b4546df458c /bug/bug_actions.go | |
parent | 21048e785d976a04e26798e4a385ee675c95b88f (diff) | |
download | git-bug-cd7ed7ff9e3250c10e97fe16c934b5a6151527bb.tar.gz |
identity: add more test for serialisation and push/pull/merge + fixes
Diffstat (limited to 'bug/bug_actions.go')
-rw-r--r-- | bug/bug_actions.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bug/bug_actions.go b/bug/bug_actions.go index 6b9135b0..f214716d 100644 --- a/bug/bug_actions.go +++ b/bug/bug_actions.go @@ -23,8 +23,7 @@ func Push(repo repository.Repo, remote string) (string, error) { } // Pull will do a Fetch + MergeAll -// This function won't give details on the underlying process. If you need more, -// use Fetch and MergeAll separately. +// This function will return an error if a merge fail func Pull(repo repository.ClockedRepo, remote string) error { _, err := Fetch(repo, remote) if err != nil { @@ -36,9 +35,7 @@ func Pull(repo repository.ClockedRepo, remote string) error { return merge.Err } if merge.Status == MergeStatusInvalid { - // Not awesome: simply output the merge failure here as this function - // is only used in tests for now. - fmt.Println(merge) + return errors.Errorf("merge failure: %s", merge.Reason) } } |