Get the files added in the first commit
eigan opened this issue · 1 comments
eigan commented
Hi!
I am unable to get the diff/files for the first commit.
There is supposed to be a lot of file changes in this commit, but the diff is empty. Is there any other way to get the files added in this initial commit?
$git = new Repository("project");
$log = $git->getLog("master");
$commits = array_reverse($log->getCommits());
print_r($commits[0]->getDiff());
eigan commented
Using git show <first-commit-hash>
gives the correct additions. But looks like Commit::getDiff() only works with diff-tree.