Zachary Stevens > Gitalist-0.000000_02 > Gitalist::Git::Project

Download:
Gitalist-0.000000_02.tar.gz

Annotate this POD

View/Report Bugs
Source   Latest Release: Gitalist-0.000003

NAME ^

Gitalist::Git::Project - Model of a git repository

SYNOPSIS ^

    my $gitrepo = dir('/repo/base/Gitalist');
    my $project = Gitalist::Git::Project->new($gitrepo);
     $project->name;        # 'Gitalist'
     $project->path;        # '/repo/base/Gitalist/.git'
     $project->description; # 'Unnamed repository.'

DESCRIPTION ^

This class models a git repository, referred to in Gitalist as a "Project".

ATTRIBUTES ^

name

The name of the Project. By default, this is derived from the path to the git repository.

path

Path::Class:Dir for the location of the git repository.

description

String containing .git/description

owner

Owner of the files on disk.

last_change

DateTime for the time of the last update. undef if the repository has never been used.

is_bare

Bool indicating whether this Project is bare.

heads

ArrayRef of hashes containing the name and sha1 of all heads.

tags

ArrayRef of hashes containing the name and sha1 of all tags.

references

Hashref of ArrayRefs for each reference.

METHODS ^

head_hash ($head?)

Return the sha1 for HEAD, or any specified head.

list_tree ($sha1?)

Return an array of contents for a given tree. The tree is specified by sha1, and defaults to HEAD. Each item is a Gitalist::Git::Object.

get_object ($sha1)

Return an appropriate subclass of Gitalist::Git::Object for the given sha1.

hash_by_path($sha1, $path, $type?)

Returns the sha1 for a given path, optionally limited by type.

list_revs($sha1, $count?, $skip?, \%search?, $file?)

Returns a list of revs for the given head ($sha1).

snapshot($sha1, $format)

Generate an archived snapshot of the repository. $sha1 should be a commit or tree. Returns a filehandle to read from.

diff($commit, $patch?, $parent?, $file?)

Generate a diff from a given Gitalist::Git::Object.

reflog(@lorgargs)

Return a list of hashes representing each reflog entry.

FIXME Should this return objects?

SEE ALSO ^

Gitalist::Git::Util Gitalist::Git::Object

AUTHORS ^

See Gitalist for authors.

LICENSE ^

See Gitalist for the license.

syntax highlighting: