franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

Add an --options argument to provide options to 'git clone' and 'git submodule add' #93

Closed gnutix closed 5 years ago

gnutix commented 5 years ago

I wanted to run studio create --git ... and checkout a specific branch. Here's the code that allows to do it and what it looks like :

studio create packages/liip/functional-test-bundle --git git@github.com:gnutix/LiipFunctionalTestBundle.git --options="--single-branch --branch=symfony43compat"

studio create packages/liip/functional-test-bundle --submodule git@github.com:gnutix/LiipFunctionalTestBundle.git --options="-b symfony43compat"
franzliedke commented 5 years ago

Hey, thanks for this proposal and an even bigger thanks for implementing it already! :raised_hands:

Just one remark: what about avoiding the extra --options argument with awkward CLI quoting and just passing all other arguments (besides --git and --submodule, obviously) through to the Git command?

gnutix commented 5 years ago

I thought about it too, but I'm not sure how to implement this with Symfony Console (fetching all "extra" arguments not defined in the Command and passing them through) - I never had to do it yet. Unfortunately, I don't really have more time to put into it right now.

franzliedke commented 5 years ago

Oh well, good enough for now. Thanks a lot!