NAME

Git::Wrapper::Plus - A Toolkit for working with Git::Wrapper in an Object Oriented Way.

VERSION

version 0.004011

DESCRIPTION

Initially, I started off with Dist::Zilla::Util:: and friends, but I soon discovered so many quirks in git, especially multiple-version support, and that such a toolkit would be more useful independent.

So Git::Wrapper::Plus is a collection of tools for using Git::Wrapper, aiming to work on all versions of Git since at least Git 1.3.

For instance, you probably don't realize this, but on older git's,

    echo > file
    git add file
    git commit
    echo 2 > file
    git add file
    git commit

does nothing, because on Git 1.3, git add is only for the addition to tree, not subsequent updates.

    echo > file
    git add file
    git commit
    echo 2 > file
    git update-index file
    git commit

Is how it works there.

And you'd have probably not realized this till you had a few smoke reports back with failures on old Gits.

And there's more common failures, like some commands simply don't exist on old gits.

MODULES

Git::Wrapper::Plus::Refs

Git::Wrapper::Plus::Refs is a low level interface to refs.

Other modules build on specific types of refs, but this one is generic.

Git::Wrapper::Plus::Branches

Git::Wrapper::Plus::Branches is a general purpose interface to branches.

This builds upon ::Refs

Git::Wrapper::Plus::Tags

Git::Wrapper::Plus::Tags is a general purpose interface to tags.

This builds upon ::Refs

Git::Wrapper::Plus::Versions

Git::Wrapper::Plus::Versions is a simple interface for comparing git versions.

Git::Wrapper::Plus::Support

Git::Wrapper::Plus::Support uses the ::Versions interface and combines it with a table of known good version ranges to provide a basic summary of supported features on different git versions.

COMMON INTERFACE

You don't have to use this interface, and its probably more convenient to use one of the other classes contained in this distribution.

However, this top level object is usable if you want an easier way to use many of the contained tools without having to pass Git::Wrapper instances everywhere.

    use Git::Wrapper::Plus;

    my $plus = Git::Wrapper::Plus->new('.');
    $plus->refs        # Git::Wrapper::Plus::Refs
    $plus->branches    # Git::Wrapper::Plus::Branches
    $plus->tags        # Git::Wrapper::Plus::Tags
    $plus->versions    # Git::Wrapper::Plus::Versions
    $plus->support     # Git::Wrapper::Plus::Support

METHODS

BUILDARGS

Construction takes 4 Forms:

    ->new( $string ) # Shorthand for ->new( { git => Git::Wrapper->new( $string ) } );
    ->new( blessed ) # Shorthand for ->new( { git => blessed } );
    ->new( @list   ) # Shorthand for ->new( { @list } );
    ->new( { key => value } ); # Final form.

ATTRIBUTES

git

refs

tags

branches

versions

support

AUTHOR

Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.

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