Closed rulatir closed 3 years ago
Allright, it seems that the doc comment on GitWorkingCopy::init()
is kind of confusing:
/**
* Create an empty git repository or reinitialize an existing one.
*
* @code $git->init(['bare' => true]);
*
* @param mixed[] $options
*/
I mistook the @code example to show the defaults for options, and I tried hard to override the supposed default with ['bare'=>false]
, but GitCommand::buildOptions()
doesn't use an option schema and therefore doesn't distinguish between options that take a value and simple flags. It will add an option for every key in the options array, even if the value is false
.
Passing
['bare' => false]
to$gitWorkingCopy->init()
does not seem to have any effect. A bare repository is created no matter what.How do I use GitWrapper to complete Task Number Zero, i.e. what I normally do with:
?