Minimally working snapshot action.
[catagits/Gitalist.git] / lib / Gitalist / Git / Project.pm
index 5129f12..5ef414d 100644 (file)
@@ -238,6 +238,19 @@ Returns a list of revs for the given head ($sha1).
         return @revs;
     }
 
+=head2 snapshot($head?, $format)
+
+Generate an archived snapshot of the repository.
+Returns a filehandle to read from.
+
+=cut
+
+method snapshot (Gitalist::Git::Object :$commit,
+                 NonEmptySimpleStr :$format
+               ) {
+               return $commit->snapshot;
+           }
+
 =head2 diff($commit, $patch?, $parent?, $file?)
 
 Generate a diff from a given L<Gitalist::Git::Object>.