Page MenuHomePhabricator

D14735.diff
No OneTemporary

D14735.diff

diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -1216,8 +1216,20 @@
// Ideally, we would use something like "for-each-ref --contains"
// to get a filtered list of branches ready for script consumption.
// Instead, try to get predictable output from "branch --contains".
+
+ $flags = array();
+ $flags[] = '--no-color';
+
+ // NOTE: The "--no-column" flag was introduced in Git 1.7.11, so
+ // don't pass it if we're running an older version. See T9953.
+ $version = $this->getGitVersion();
+ if (version_compare($version, '1.7.11', '>=')) {
+ $flags[] = '--no-column';
+ }
+
list($branches) = $this->execxLocal(
- '-c column.ui=never -c color.ui=never branch --contains %s',
+ 'branch %Ls --contains %s',
+ $flags,
$commit);
$branches = array_filter(explode("\n", $branches));

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 1:39 AM (12 h, 41 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713476
Default Alt Text
D14735.diff (1 KB)

Event Timeline