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

NAME

Git::LowLevel::Reference - class representing a reference in a git repository

VERSION

version 0.1

DESCRIPTION

Class representing a Reference object within the Git::LowLevel distribution.

References in git normally start with refs/heads/ e.g. refs/heads/master

To get a reference to an existing or non existing reference your first require a Git::LowLevel object representing a git repository.

  my $repository = Git::LowLevel->new(git_dir => "/tmp/repo");
  my $ref        = $repository->getReference();

The main methods within a reference object are getTree to fetch a tree object of the selected reference, find to find a specific path within the tree and commit to commit any changes to the tree and update the reference within git.

ATTRIBUTES

repository

the repository the rerference lives in

reference

the reference path e.g. refs/heads/master

_hash

the hash pointing to by the reference

tree

the tree of this reference

METHODS

exist

checks if the reference already exists

1 = exist, 0 = not exist

hash

returns the hash pointing to by the reference

getTree

return the tree pointing to by the hash

find

find a path within the tree of the reference

commit

commit all changes and update the reference

AUTHOR

Dominik Meyer <dmeyer@federationhq.de>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Dominik Meyer.

This is free software, licensed under:

  The GNU General Public License, Version 2, June 1991