NAME
Git::Native::Remote::Result - Per-ref outcomes from a Remote fetch or push
VERSION
version 0.004
SYNOPSIS
my $r = $remote->fetch(
refspecs => ['+refs/heads/*:refs/remotes/origin/*'],
);
if ( !$r->ok ) {
for my $u ( @{ $r->updated } ) {
warn "updated $u->{ref}: $u->{from} // $u->{to}\n";
}
for my $u ( @{ $r->rejected } ) {
warn "rejected $u->{ref}: $u->{reason}\n";
}
}
DESCRIPTION
Structured return value from Git::Native::Remote's fetch and push. See "updated", "rejected", and "ok".
updated
Arrayref of hashrefs, one per ref that was actually moved.
Each entry: C<< { ref => $str, from => $oid_hex|undef, to => $oid_hex } >>.
C<from> is C<undef> for refs that didn't exist on the local side before the
operation (a brand-new branch fetched or pushed). On a push, C<from> is
always the local tip the ref was moving from (i.e. C<undef> when pushing
a brand-new ref that the remote didn't have).
rejected
Arrayref of hashrefs, one per ref that the server refused to accept.
Each entry: C<< { ref => $str, reason => $str } >>. C<reason> is the
libgit2 / server message; C<""> (empty) when the server reported a
rejection with no specific text. On a successful push, C<rejected> is
empty (the successful refs are in C<updated>).
ok
True iff both C<updated> and C<rejected> are empty. Note that a
fully-successful push still reports its refs in C<updated> (so C<ok>
is false) — the typical "did anything go wrong" check is
C<< !$r->rejected >>.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-git-native/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.