logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Git::Raw::Worktree - Git worktree class

Author

       Jacques Germishuys <jacquesg@cpan.org>

Description

       A Git::Raw::Worktree represents a git worktree.

       WARNING: The API of this module is unstable and may change without warning (any change will be
       appropriately documented in the changelog).

Methods

add($repo,$name,$path)
       Add a new worktree.

   lookup($repo,$name)
       Lookup a worktree.

   name()
       Retrieve the name of the worktree.

   path()
       Retrieve the filesystem path for the worktree.

   repository()
       Open the worktree as a repository. Returns a Git::Raw::Repository object.

   list($repo)
       List all worktress for $repo.

   is_locked()
       Check if the worktree is locked. Returns the reason for locking or a falsy value.

   is_prunable(\%prune_opts)
       Check if the worktree can be pruned. Valid fields for th %prune_opts hash are:

       •   "flags"

           Prune flags. Valid values include:

           •       "valid"

                   Prune the working tree even if working tree is valid.

           •       "locked"

                   Prune the working tree even if it is locked.

           •       "working_tree"

                   Prune checked out working tree.

   lock($reason)
       Lock the worktree with $reason.

   unlock()
       Unlock the worktree.

   validate()
       Check if the worktree is valid. A valid worktree requirest both the git data structures inside the linked
       parent repository and the linked working copy to be present.

   prune(\%prune_opts)
       Prune  the  working  tree.  Pruning  the  working  tree  removes  the  git  data  structures on disk. See
       "is_prunable" for valid values of %prune_opts.

Name

       Git::Raw::Worktree - Git worktree class

Version

       version 0.90

See Also