Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14045111
D9616.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
851 B
Referenced Files
None
Subscribers
None
D9616.diff
View Options
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
@@ -600,11 +600,17 @@
$futures = array(
$uncommitted_future,
$untracked_future,
- $unstaged_future,
+ // NOTE: `git diff-files` races with each of these other commands
+ // internally, and resolves with inconsistent results if executed
+ // in parallel. To work around this, DO NOT run it at the same time.
+ // After the other commands exit, we can start the `diff-files` command.
);
Futures($futures)->resolveAll();
+ // We're clear to start the `git diff-files` now.
+ $unstaged_future->start();
+
$result = new PhutilArrayWithDefaultValue();
list($stdout) = $uncommitted_future->resolvex();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 1:12 AM (3 h, 41 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6723251
Default Alt Text
D9616.diff (851 B)
Attached To
Mode
D9616: Fix race condition inside `git diff-files`
Attached
Detach File
Event Timeline
Log In to Comment