matteosister/GitElephant — pull request #37 by clemens-tolboom (2014-05-30 10:13:37+00:00)
Title: Add more info to the exception.

Without this patch it's hard to find the reason why.

We had a hard time to finding why our commit failed.

With this patch output is something like

```
RuntimeException : Exit code: 1 while executing: "/usr/local/bin/git commit '-a' '-m' 'testGitPull-commit'" with reason:
On branch master
nothing to commit, working directory clean
```

I also tried to inject exit code 1 into
```php
class Caller implements CallerInterface
{
...
public function execute($cmd, $git = true, $cwd = null, $acceptedExitCodes = array(0))
```
from

```php
class MainCommand extends BaseCommand
{
...
public function commit($message, $stageAll = false, $author = null)
```
but failed.

### Open issues are
- [ ] Can we add git exit code 1 to `$acceptedExitCodes` for commit?
- [ ] Is git exit code 1 allows OK to add to `$acceptedExitCodes`?
- [ ] Are there more exit codes to `$acceptedExitCodes`?