Skip to content

Commit

Permalink
Merge pull request #110 from telia-oss/clean-rebase-output
Browse files Browse the repository at this point in the history
Clean rebase output by using oneliner
  • Loading branch information
Kristian authored May 31, 2019
2 parents e8d59d1 + 2af9d27 commit f0d83d1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions git.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ func (g *GitClient) Merge(sha string) error {

// Rebase ...
func (g *GitClient) Rebase(baseRef string, headSha string) error {
if err := g.command("git", "checkout", headSha).Run(); err != nil {
return fmt.Errorf("checkout failed: %s", err)
}
if err := g.command("git", "rebase", baseRef).Run(); err != nil {
if err := g.command("git", "rebase", baseRef, headSha).Run(); err != nil {
return fmt.Errorf("rebase failed: %s", err)
}
return nil
Expand Down

0 comments on commit f0d83d1

Please sign in to comment.