README.md 857 Bytes
Newer Older
1
2
3
Git::Wrapper
============

Nic Q's avatar
Nic Q committed
4
5
[![Build Status](https://travis-ci.org/nicqrocks/p6-Git-Wrapper.svg?branch=master)](https://travis-ci.org/nicqrocks/p6-Git-Wrapper)

Nic Q's avatar
Nic Q committed
6
Hacky way to use git from Perl 6 "inspired" by Perl 5's version of the module of the same name. Originally made by [PerlPilot](https://github.com/perlpilot).
7

8
## SYNOPSIS
9

Nic Q's avatar
Nic Q committed
10
    my $git = Git::Wrapper.new(
Jonathan Scott Duff's avatar
Jonathan Scott Duff committed
11
12
        git-executable     => '/path/to/git',   # optional
        gitdir             => '/foo/bar',
13
    );
14

15
16
    $git.version;       # version of git being used
    $git.gitdir;        # path to git repo
17

18
## example
19

20
21
22
23
24
25
    #!/usr/bin/env perl6

    use Git::Wrapper;

    my $git = Git::Wrapper.new( gitdir => "/path/to/existing/dir" );
    $git.clone("https://github.com/rakudo/rakudo.git");
Jonathan Scott Duff's avatar
Jonathan Scott Duff committed
26
    my @log = $git.log;
27
28

    for @log -> $l {
Jonathan Scott Duff's avatar
Jonathan Scott Duff committed
29
        say "{$l.author} {$l.date} {$l.summary}";
30
    }