1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-24 14:30:55 +01:00

Get branch name with --no-color option

This commit is contained in:
dennis zhuang 2012-09-13 15:12:19 -07:00
parent 7ee0f3e3b3
commit d65b953252

View file

@ -336,7 +336,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
// $ git rev-parse --abbrev-ref `git symbolic-ref HEAD` // $ git rev-parse --abbrev-ref `git symbolic-ref HEAD`
// //
// But that may fail if you're not on a branch. // But that may fail if you're not on a branch.
list($stdout) = $this->execxLocal('branch'); list($stdout) = $this->execxLocal('branch --no-color');
$matches = null; $matches = null;
if (preg_match('/^\* (.+)$/m', $stdout, $matches)) { if (preg_match('/^\* (.+)$/m', $stdout, $matches)) {