Skip to content

Commit

Permalink
Merge pull request #3608 from ActiveState/mitchell/dx-3175
Browse files Browse the repository at this point in the history
`state pull` should use the already-merged commit's build script instead of attempting a merge.
  • Loading branch information
mitchell-as authored Dec 2, 2024
2 parents cf26542 + fdb87b0 commit e554f37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/runners/pull/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,10 @@ func (p *Pull) mergeBuildScript(remoteCommit, localCommit strfmt.UUID) error {
// Compute the merge strategy.
strategies, err := model.MergeCommit(remoteCommit, localCommit)
if err != nil {
switch {
case errors.Is(err, model.ErrMergeFastForward):
if errors.Is(err, model.ErrMergeFastForward) || errors.Is(err, model.ErrMergeCommitInHistory) {
return buildscript_runbit.Update(p.project, scriptB)
case !errors.Is(err, model.ErrMergeCommitInHistory):
return locale.WrapError(err, "err_mergecommit", "Could not detect if merge is necessary.")
}
return locale.WrapError(err, "err_mergecommit", "Could not detect if merge is necessary.")
}

// Attempt the merge.
Expand Down

0 comments on commit e554f37

Please sign in to comment.