1 package Gitalist::URIStructure::Commit;
2 use MooseX::MethodAttributes::Role;
3 use namespace::autoclean;
9 confess("No repository in the stash")
10 unless $c->stash->{Repository};
13 sub find : Chained('base') PathPart('') CaptureArgs(1) {
14 my ($self, $c, $sha1part) = @_;
15 # FIXME - Should not be here!
16 $c->stash->{Commit} = $c->stash->{Repository}->get_object($sha1part)
17 or $c->detach('/error404', "Couldn't find a object for '$sha1part' in XXXX!");
20 sub diff : Chained('find') CaptureArgs(0) {}
22 sub diff_fancy : Chained('diff') PathPart('') Args(0) {}
24 sub diff_plain : Chained('diff') PathPart('plain') Args(0) {}
26 sub tree : Chained('find') Args() {}
28 sub commit : Chained('find') PathPart('') {}
30 sub blob : Chained('find') Args() {}
32 sub blame : Chained('find') Args() {}
34 sub history : Chained('find') Args() {}
36 sub raw : Chained('find') Args() {}