mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Don't link files with no rendering changeset in DiffusionCommitChangeTableView
Summary: When directories are added (e.g., on the `hg` initial commit, "/" is added) we don't render any diff for them but try to link to it in the table of contents. Possibly we should render a diff saying "this directory was added", but stop it from complaining for now. Test Plan: Looked at several hg and git commits which add directories to verify this gives us generally sensible behvior. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D3663
This commit is contained in:
parent
6bbdd2609a
commit
a18de93a8c
1 changed files with 14 additions and 10 deletions
|
@ -54,17 +54,21 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
|
||||||
$path .= '/';
|
$path .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$path_column = javelin_render_tag(
|
if (isset($this->renderingReferences[$id])) {
|
||||||
'a',
|
$path_column = javelin_render_tag(
|
||||||
array(
|
'a',
|
||||||
'href' => '#'.$hash,
|
array(
|
||||||
'meta' => array(
|
'href' => '#'.$hash,
|
||||||
'id' => 'diff-'.$hash,
|
'meta' => array(
|
||||||
'ref' => $this->renderingReferences[$id],
|
'id' => 'diff-'.$hash,
|
||||||
|
'ref' => $this->renderingReferences[$id],
|
||||||
|
),
|
||||||
|
'sigil' => 'differential-load',
|
||||||
),
|
),
|
||||||
'sigil' => 'differential-load',
|
phutil_escape_html($path));
|
||||||
),
|
} else {
|
||||||
phutil_escape_html($path));
|
$path_column = phutil_escape_html($path);
|
||||||
|
}
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
$this->linkHistory($change->getPath()),
|
$this->linkHistory($change->getPath()),
|
||||||
|
|
Loading…
Reference in a new issue