-
Notifications
You must be signed in to change notification settings - Fork 21
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
cli: expose all merge settings flags to driver. #102
Conversation
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.
F&S.
@@ -171,33 +160,21 @@ def uninstall_kintsugi_driver_globally | |||
end |
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.
If I pass kintsugi install-driver --allow-duplicates
will write the driver command to the gitconfig as:
kintsugi driver %O %A %B %P --allow-duplicates true
which is incorrect, because allow-duplcates
doesn't accept any parameter. Either add a parameter to allow-duplicates
to make it like interactive-resolution
or solve this some other way.
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.
take a look now
7aa4b13
to
e9625fa
Compare
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.
Looks good! F&S
lib/kintsugi/cli.rb
Outdated
case switch | ||
when OptionParser::Switch::NoArgument | ||
[prefix + option_name.to_s] | ||
when NilClass |
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.
Do we want to assume that options
are a result of parsing with the option parser? If so, invalid flags will be catched by the parse!
method and we don't need to treat this case here.
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 don't want to have an if else
situation that will treat nil
as either short or long if anything changes somewhere.
lib/kintsugi/cli.rb
Outdated
else | ||
[prefix + option_name.to_s, option_value] | ||
end | ||
end.compact.flatten |
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.
Is compact
necessary here? It should never happen with the current code
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.
correct
lib/kintsugi/cli.rb
Outdated
@@ -88,9 +77,23 @@ def create_install_driver_subcommand | |||
end | |||
|
|||
driver_options = options.map do |option_name, option_value| |
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.
nit: I'd extract this to another function because it's quite long now.
e9625fa
to
1f87fd6
Compare
F&Sed |
No description provided.