sub commitdiff : Local {
my ( $self, $c ) = @_;
-
+ $c->stash(current_model => 'GitRepos');
my $commit = $self->_get_commit($c);
- my($tree, $patch) = $c->model()->diff(
+ my($tree, $patch) = $c->stash->{Project}->diff(
commit => $commit,
- parent => $c->req->param('hp') || '',
+ parent => $c->req->param('hp') || undef,
patch => 1,
);
$c->stash(
# XXX Ideally this would return a wee object instead of ad hoc structures.
method diff ( Gitalist::Git::Object :$commit,
Bool :$patch?,
- NonEmptySimpleStr :$parent?,
+ Maybe[NonEmptySimpleStr] :$parent?,
NonEmptySimpleStr :$file? ) {
# Use parent if specifed, else take the parent from the commit
# if there is only one, otherwise it was a merge commit.