Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return commit hash for dolt_merge() when --no-ff is not specified #6281

Merged
merged 31 commits into from
Jul 10, 2023

Conversation

jycor
Copy link
Contributor

@jycor jycor commented Jul 5, 2023

Fix a bug where we didn't return the commit hash for dolt_merge() when the --no-ff argument wasn't specified, and we performed a non-ff merge.

Made it so that fast-forward merged will also return the new HEAD commit hash.

Additionally, changed many enginetests to use the new DoltCommitType to validate dolt commit hashes.

Also prevents panics when doing call dolt_merge().

Companion PR:
dolthub/go-mysql-server#1865

@jycor jycor changed the title return commit hash for dolt_merge when --no-ff is not specified return commit hash for dolt_merge() when --no-ff is not specified Jul 5, 2023
@@ -92,6 +92,10 @@ func doDoltMerge(ctx *sql.Context, args []string) (string, int, int, error) {
return "", noConflictsOrViolations, threeWayMerge, err
}

if apr.NArg() < 1 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevents panic caused by branchName := apr.Arg(0) when running query call dolt_merge()

Query: "CALL DOLT_COMMIT('-am','made changes in other')",
SkipResultsCheck: true,
Query: "CALL DOLT_COMMIT('-am','made changes in other')",
Expected: []sql.Row{{doltCommit}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so awesome to see us able to remove so many SkipResultsChecks! 🙏 Great work!

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This turned into a really cool upgrade for our test framework. 👏 Thank you! 🚢

@jycor jycor merged commit ea9839f into main Jul 10, 2023
@Hydrocharged Hydrocharged deleted the james/merge1 branch August 24, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants