Git::RawPerl bindings to the Git linkable library (libgit2) | |
Download |
Git::Raw Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Alessandro Ghedini
- Publisher web site:
- http://search.cpan.org/~alexbio/
Git::Raw Tags
Git::Raw Description
libgit2 is a pure C implementation of the Git core methods provided as a re-entrant linkable library designed to be fast and portable with a solid API. Git::Raw is a Perl module that provides Perl bindings to the libgit2 API.SYNOPSIS use Git::Raw; # open the Git repository at $path my $repo = Git::Raw::Repository -> open($path); # add a file to the repository default index my $index = $repo -> index; $index -> add('test'); $index -> write; # create a new tree out of the repository index my $tree_id = $index -> write_tree; my $tree = $repo -> lookup($tree_id); # retrieve user's name and email from the Git configuration my $config = $repo -> config; my $name = $config -> str('user.name'); my $email = $config -> str('user.email'); # create a new Git signature my $me = Git::Raw::Signature -> now($name, $email); # create a new commit out of the above tree, with no parents my $commit = $repo -> commit('initial commit', $me, $me, [], $tree);Product's homepage
Git::Raw Related Software