Skip to content

Commit 8244bce

Browse files
committed
make git-merge compatible with git-wrapper
1 parent 261d9a9 commit 8244bce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/PhpMerge/GitMerge.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,12 @@ protected function setup()
339339
}
340340
$this->dir = $tempfile . '.git';
341341
$this->git = $this->wrapper->init($this->dir);
342+
342343
}
343-
$this->git->config('user.name', 'GitMerge')
344-
->config('user.email', 'gitmerge@php-merge.example.com')
345-
->config('merge.conflictStyle', 'diff3');
344+
if ($this->git) {
345+
$this->git->config('user.name', 'GitMerge');
346+
$this->git->config('user.email', 'gitmerge@php-merge.example.com');
347+
$this->git->config('merge.conflictStyle', 'diff3'); }
346348
}
347349

348350
/**

0 commit comments

Comments
 (0)