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

cli: expose all merge settings flags to driver. #102

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

ashdnazg
Copy link
Member

@ashdnazg ashdnazg commented Apr 9, 2023

No description provided.

Copy link
Collaborator

@byohay byohay left a 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
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

take a look now

Copy link
Collaborator

@byohay byohay left a 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

case switch
when OptionParser::Switch::NoArgument
[prefix + option_name.to_s]
when NilClass
Copy link
Collaborator

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.

Copy link
Member Author

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.

else
[prefix + option_name.to_s, option_value]
end
end.compact.flatten
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

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

correct

@@ -88,9 +77,23 @@ def create_install_driver_subcommand
end

driver_options = options.map do |option_name, option_value|
Copy link
Collaborator

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.

@ashdnazg
Copy link
Member Author

F&Sed

@ashdnazg ashdnazg merged commit bc27673 into Lightricks:main Apr 10, 2023
1 check passed
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.

None yet

2 participants