NAME
Git::Native::Reference - A Git reference (branch, tag, HEAD)
VERSION
version 0.003
SYNOPSIS
my $ref = $repo->reference('refs/heads/main');
say $ref->name; # refs/heads/main
say $ref->shorthand; # main
say $ref->target; # OID
$ref->delete;
my $head = $repo->reference('HEAD');
say $head->symbolic_target; # refs/heads/main
say $head->resolve->target; # OID HEAD points at
DESCRIPTION
A Git reference. Direct refs carry an oid target; symbolic refs carry a symbolic_target (a refname) and resolve to a direct ref.
Read accessors: name, shorthand, target, symbolic_target, is_symbolic, is_branch, is_remote, is_tag.
Mutators return a fresh Reference: set_target (direct refs), symbolic_set_target (symbolic refs), plus delete.
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.