Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13976917
D16149.id38853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D16149.id38853.diff
View Options
diff --git a/src/applications/repository/daemon/PhabricatorGitGraphStream.php b/src/applications/repository/daemon/PhabricatorGitGraphStream.php
--- a/src/applications/repository/daemon/PhabricatorGitGraphStream.php
+++ b/src/applications/repository/daemon/PhabricatorGitGraphStream.php
@@ -5,6 +5,7 @@
private $repository;
private $iterator;
+ private $startCommit;
private $parents = array();
private $dates = array();
@@ -14,6 +15,7 @@
$start_commit = null) {
$this->repository = $repository;
+ $this->startCommit = $start_commit;
if ($start_commit !== null) {
$future = $repository->getLocalCommandFuture(
@@ -82,10 +84,18 @@
}
}
- throw new Exception(
- pht(
- "No such commit '%s' in repository!",
- $commit));
+ if ($this->startCommit !== null) {
+ throw new Exception(
+ pht(
+ 'Commit "%s" is not a reachable ancestor of "%s".',
+ $commit,
+ $this->startCommit));
+ } else {
+ throw new Exception(
+ pht(
+ 'Commit "%s" is not a reachable ancestor of any ref.',
+ $commit));
+ }
}
private function isParsed($commit) {
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
@@ -157,7 +157,12 @@
$name = $ref->getShortName();
$commit = $ref->getCommitIdentifier();
- $this->log(pht('Examining ref "%s", at "%s".', $name, $commit));
+ $this->log(
+ pht(
+ 'Examining "%s" (%s) at "%s".',
+ $name,
+ $ref->getRefType(),
+ $commit));
if (!$repository->shouldTrackRef($ref)) {
$this->log(pht('Skipping, ref is untracked.'));
@@ -169,6 +174,15 @@
continue;
}
+ // In Git, it's possible to tag a tag. We just skip these, we'll discover
+ // them when we process the target tag. See T11180.
+ $fields = $ref->getRawFields();
+ $tag_type = idx($fields, '*objecttype');
+ if ($tag_type == 'tag') {
+ $this->log(pht('Skipping, this is a tag of a tag.'));
+ continue;
+ }
+
$this->log(pht('Looking for new commits.'));
$head_refs = $this->discoverStreamAncestry(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 19 2024, 4:17 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6732007
Default Alt Text
D16149.id38853.diff (2 KB)
Attached To
Mode
D16149: Handle tag tags properly in discovery
Attached
Detach File
Event Timeline
Log In to Comment