Git::Wrapper::More
====================

# Summary
Git::Wrapper::More is a handy collection of Git::Wrapper usages.  Git::Wrapper powerfully enables git repository manipulation, but has multiple command invocations. They sometimes require only one style or another.  Git::Wrapper::More can serve up the more common ones, or be used as a reference.

# Target audience
This was built to serve one department's needs for a couple projects using Git (iDev at cPanel L.L.C.).  The list of subroutines is small, and as of version 0, it might serve best as a cheetsheet for anyone wanting to use Git::Wrapper.

# Cheat sheet
Git::Wrapper::More so far has these usages of Git::Wrapper.
* Using a Git::Wrapper object named $gw_obj
* See perldoc Git/Wrapper/More.pm for more info, and bash equivalents of these commands
```
sub canstatus {
    $gw_obj->status()

sub cwdbranch {
    $return = $gw_obj->rev_parse(qw/ --abbrev-ref HEAD /) )[0]

sub toplevel {
    $return = $gw_obj->rev_parse(qw/ --show-toplevel /) )[0]

sub lsfiles {
    @return = $gw_obj->ls_files( $top_level_dir, { full_name => 1 } )

sub mergebase {
    $gw_obj->merge_base( "$remote/$branch_current", "$remote/$branch_parent" ) )[0]
    # note: this goes wrong often, see the code

sub getremote {
    $return = $gw_obj->config( "--get", "branch.$branch.remote" ) )[0]

sub logsincecommit {
    @return = $gw_obj->log(qq/${commit}../)

sub lastmergecommit {
    $return = ( $gw_obj->rev_list( { merges => 1 }, ${commit} ) )[0]

sub logfiles {
    @raw_results = $gw_obj->RUN( 'log', "--max-count=$num", '--name-only', '--pretty=format:' )

sub show {
    $return = $gw_obj->show( { summary => 1 }, $commit )

sub logsincedate {
    @raw_results = $gw_obj->RUN( 'log', "--since=$days", '--name-only', '--pretty=format:' )

sub diffbranches {
    @raw_results = $gw_obj->diff( qw/--name-status --diff-filter=M/, $range )

sub unstagedfiles {
    @raw_results = $gw_obj->diff(qw/--name-status --diff-filter=M/)
```

# Installation

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

# Support and Documentation

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Git::Wrapper::More

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        https://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Wrapper-More

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Git-Wrapper-More

    CPAN Ratings
        https://cpanratings.perl.org/d/Git-Wrapper-More

    Search CPAN
        https://metacpan.org/release/Git-Wrapper-More

# License and Copyright

This software is Copyright (c) 2019 by cPanel L.L.C

copyright@cpanel.net

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)


