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
Add --author, -m to COMMIT. Add --author to MERGE() #1090
Conversation
if sess.Username == "" || sess.Email == "" { | ||
return nil, errors.New("commit function failure: Username and/or email not configured") | ||
|
||
// Get the params associated with MERGE. We can share the commit argparser for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use a MergeParser now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because the Merge in commands.go and the Merge in dfunctions.go support different arguments. This could trip up the HelpAndUsagePrinters function.
I am going to leave this as a TODO for now, and do some refactoring in a future PR.
} | ||
|
||
// Eval implements the Expression interface. | ||
func (cf *CommitFunc) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) { | ||
val, err := cf.Child.Eval(ctx, row) | ||
dbName := ctx.GetCurrentDatabase() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about code duplication from the other PR applies here. Do another pass on this in the near future to consolidate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Fix up tests fix commit tests.... Add author param to merge formatting... Fix array prob
63c07c2
to
442ab7d
Compare
COMMIT('-m', 'hi', '--author', 'John Doe john@doe.com')
MERGE('feature-branch', '--author', 'John Doe john@doe.com')