NAME

Git::Database::Object::Tree - A tree object in the Git object database

VERSION

version 0.007

SYNOPSIS

my $r    = Git::Database->new();        # current Git repository
my $tree = $r->get_object('b52168');    # abbreviated digest

# attributes
$tree->kind;      # tree
$tree->digest;    # b52168be5ea341e918a9cbbb76012375170a439f
...;              # etc., see below

DESCRIPTION

Git::Database::Object::Tree represents a tree object obtained via Git::Database from a Git object database.

ATTRIBUTES

All attributes have a predicate method.

kind

The object kind: tree.

digest

The SHA-1 digest of the tree object.

content

The object's actual content.

size

The size (in bytes) of the object content.

directory_entries

An array reference containing a list of Git::Database::DirectoryEntry objects representing the content of the tree.

METHODS

new()

Create a new Git::Object::Database::Commit object.

One (and only one) of the content or directory_entries arguments is required.

directory_entires is an array reference containing a list of Git::Database::DirectoryEntry objects representing the content of the tree.

as_string()

The content of the tree object, in the format returned by git ls-tree.

SEE ALSO

Git::Database, Git::Database::Role::Object.

AUTHOR

Philippe Bruhat (BooK) <book@cpan.org>.

COPYRIGHT

Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.