NAME

Dist::Zilla::Util::Git::Branches::Branch - A Branch object

VERSION

version 0.001000

METHODS

new_from_Ref

Convert a Git::Refs::Ref to a Git::Branches::Branch

    my $branch = $class->new_from_Ref( $ref );

sha1

Returns the SHA1 of the branch tip.

delete

    $branch->delete(); # git branch -d $branch->name

    $branch->delete({ force => 1 }); # git branch -D $branch->name

Note: $branch will of course still exist after this step.

move

    $branch->move($new_name); # git branch -m $branch->name, $new_name

    $branch->move($new_name, { force => 1 }); # git branch -M $branch->name $new_name

Note: $branch will of course, still exist after this step

AUTHOR

Kent Fredric <kentfredric@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 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.