Skip to content

Commit

Permalink
Merge pull request #7075 from dolthub/aaron/fix-local-remote-ref-upda…
Browse files Browse the repository at this point in the history
…te-in-push

[no-release-notes] go/libraries/doltcore/env/actions: remotes.go: Small fix to SetHeadToCommit our local remote ref when pushing even in fast-forward mode.
  • Loading branch information
reltuk authored Nov 30, 2023
2 parents 804f1c1 + 18b96ed commit 0d5eeb5
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 0d5eeb5

Please sign in to comment.