Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15332691
D16234.id39051.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
805 B
Referenced Files
None
Subscribers
None
D16234.id39051.diff
View Options
diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
@@ -759,6 +759,13 @@
'repositoryPHID = %s',
$repository->getPHID());
+ // If we don't have any refs to update, bail out before building a graph
+ // stream. In particular, this improves behavior in empty repositories,
+ // where `git log` exits with an error.
+ if (!$old_refs) {
+ return;
+ }
+
// We can share a single graph stream across all the checks we need to do.
$stream = new PhabricatorGitGraphStream($repository);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 8, 7:16 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383990
Default Alt Text
D16234.id39051.diff (805 B)
Attached To
Mode
D16234: Don't try to prune unreachable commits from repositories with no outdated refs
Attached
Detach File
Event Timeline
Log In to Comment