Git::Class::Role::Push - Git::Class::Role::Push documentation


Git-Class documentation Contained in the Git-Class distribution.

Index


Code Index:

NAME

Top

Git::Class::Role::Push

DESCRIPTION

Top

This is a role that does git push .... See http://www.kernel.org/pub/software/scm/git-core/docs/git-push.html for details.

METHOD

Top

push

AUTHOR

Top

Kenichi Ishigaki, <ishigaki@cpan.org>

COPYRIGHT AND LICENSE

Top


Git-Class documentation Contained in the Git-Class distribution.

package Git::Class::Role::Push;

use Any::Moose '::Role'; with 'Git::Class::Role::Execute';
requires 'git';

sub push {
  my $self = shift;

  # my ($options, @args) = $self->_get_options(@_);

  $self->git( push => @_ );
}

around _error => sub {
  my ($org, $self, $err) = @_;

  # ignore normal (non-error) messages
  # (these will be shown anyway under the verbose mode)
  return if $err &&
           ($err =~ /^To\s\S+\n\s+\w{7}\.\.\w{7}/
         or $err =~ /^Everything up\-to\-date/);

  $self->$org($err);
};

1;

__END__