Skip to content

Commit

Permalink
[no-release-notes] go/libraries/doltcore/env/actions: remotes.go: Sma…
Browse files Browse the repository at this point in the history
…ll fix to SetHeadToCommit our local remote ref when pushing even in fast-forward mode.
  • Loading branch information
reltuk committed Nov 30, 2023
1 parent 804f1c1 commit 18b96ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go/libraries/doltcore/env/actions/remotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ func Push(ctx context.Context, tempTableDir string, mode ref.UpdateMode, destRef
if err != nil {
return err
}
err = srcDB.FastForward(ctx, remoteRef, commit)
// We set the remote ref to the commit here, regardless of its
// previous value. It does not need to be a FastForward update
// of the local ref for this operation to succeed.
err = srcDB.SetHeadToCommit(ctx, remoteRef, commit)
}

return err
Expand Down

0 comments on commit 18b96ed

Please sign in to comment.