The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::Role::Git::LocalRepository::CurrentBranch - Query state from Git about the current branch

VERSION

version 0.2.0

METHODS

current_branch

If the consuming package is on a valid Git branch, this will return the name of it.

If not on a valid branch, will return false.

COMPOSITION

Recommended application order if using this role:

    with "Dist::Zilla::Role::Plugin";
    with "Dist::Zilla::Role::Git::LocalRepository";
    with "Dist::Zilla::Role::Git::LocalRepository::LocalBranches";
    with "Dist::Zilla::Role::Git::LocalRepository::CurrentBranch";

REQUIRED METHODS

git

Must return a Git::Wrapper or compatible instance

Suggests: Dist::Zilla::Role::Git::LocalRepository

local_branches

Must return a HashRef mapping branch name to branch SHA1.

Suggests: Dist::Zilla::Role::Git::LocalRepository::LocalBranches

PRIVATE METHODS

_current_sha1

Returns the SHA1 for the current HEAD

AUTHOR

Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Kent Fredric <kentnl@cpan.org>.

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