blib/lib/Git/Raw/Worktree.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Git/Raw/Walker.pm ↑ Summary deps/libgit2/src/libgit2/cache.h »
1 package Git::Raw::Worktree;
2 87 $Git::Raw::Worktree::VERSION = '0.90';
3 87 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 87 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 87 ▶use Git::Raw;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Git::Raw::Worktree - Git worktree class
11  
12 =head1 VERSION
13  
14 version 0.90
15  
16 =head1 DESCRIPTION
17  
18 A L<Git::Raw::Worktree> represents a git worktree.
19  
20 B<WARNING>: The API of this module is unstable and may change without warning
21 (any change will be appropriately documented in the changelog).
22  
23 =head1 METHODS
24  
25 =head2 add( $repo, $name, $path )
26  
27 Add a new worktree.
28  
29 =head2 lookup( $repo, $name )
30  
31 Lookup a worktree.
32  
33 =head2 name( )
34  
35 Retrieve the name of the worktree.
36  
37 =head2 path( )
38  
39 Retrieve the filesystem path for the worktree.
40  
41 =head2 repository( )
42  
43 Open the worktree as a repository. Returns a L<Git::Raw::Repository> object.
44  
45 =head2 list( $repo )
46  
47 List all worktress for C<$repo>.
48  
49 =head2 is_locked( )
50  
51 Check if the worktree is locked. Returns the reason for locking or a falsy value.
52  
53 =head2 is_prunable( \%prune_opts )
54  
55 Check if the worktree can be pruned. Valid fields for th C<%prune_opts> hash
56 are:
57  
58 =over 4
59  
60 =item * "flags"
61  
62 Prune flags. Valid values include:
63  
64 =over 8
65  
66 =item * "valid"
67  
68 Prune the working tree even if working tree is valid.
69  
70 =item * "locked"
71  
72 Prune the working tree even if it is locked.
73  
74 =item * "working_tree"
75  
76 Prune checked out working tree.
77  
78 =back
79  
80 =back
81  
82 =head2 lock( $reason )
83  
84 Lock the worktree with C<$reason>.
85  
86 =head2 unlock( )
87  
88 Unlock the worktree.
89  
90 =head2 validate( )
91  
92 Check if the worktree is valid. A valid worktree requirest both the git data
93 structures inside the linked parent repository and the linked working copy to
94 be present.
95  
96 =head2 prune( \%prune_opts )
97  
98 Prune the working tree. Pruning the working tree removes the git data structures
99 on disk. See C<is_prunable> for valid values of C<%prune_opts>.
100  
101 =head1 AUTHOR
102  
103 Jacques Germishuys <jacquesg@cpan.org>
104  
105 =head1 LICENSE AND COPYRIGHT
106  
107 Copyright 2018 Jacques Germishuys.
108  
109 This program is free software; you can redistribute it and/or modify it
110 under the terms of either: the GNU General Public License as published
111 by the Free Software Foundation; or the Artistic License.
112  
113 See http://dev.perl.org/licenses/ for more information.
114  
115 =cut
116  
117 87 1; # End of Git::Raw::Worktree
« blib/lib/Git/Raw/Walker.pm ↑ Summary deps/libgit2/src/libgit2/cache.h »