Allow Diffusion to display the initial commit in Git repositories

Summary: See T507. Since you can't do "xxxxxxxx^" where "xxxxxxxx" is the first
commit in a repository, fall back to diffing against the empty tree if we fail
to diff against the parent commit.

Test Plan: Looked at the first commit in libphutil on my local.

Reviewers: edward, jungejason, nh, tuomaspelkonen, aran

Reviewed By: nh

CC: aran, edward, epriestley, nh

Differential Revision: 953
This commit is contained in:
epriestley
2011-09-21 16:05:43 -07:00
parent 05084b2e57
commit 8e8d91a1ff
3 changed files with 32 additions and 7 deletions

View File

@@ -405,7 +405,7 @@ class PhabricatorRepositoryEditController
if ($is_git) {
$instructions =
'Enter the URI to clone this repository from. It should look like '.
'<tt>git@github.com:example/example.git</tt>, <tt> '.
'<tt>git@github.com:example/example.git</tt> or '.
'<tt>ssh://user@host.com/git/example.git</tt>';
} else if ($is_mercurial) {
$instructions =