matteosister / GitElephant

An abstraction layer for git written in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to set per-command options, arguments, config

geek-merlin opened this issue · comments

Currently this seems the only way of setting command args etc.

    $repo->addGlobalConfig('rebase.autoStash', 'true');
    $repo->addGlobalCommandArgument('--strategy=ours');
    $repo->pull($destination, 'HEAD', FALSE);
    $repo->removeGlobalCommandArgument('--strategy=ours');
    $repo->removeGlobalConfig('rebase.autoStash');

I'd propose to extend all commands' signatures like this:
$repo->pull($destination, 'HEAD', FALSE, /* options */ [], /* args */ ['--strategy=ours'], /* config*/['rebase.autoStash' => TRUE]);