| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Git::Class::Worktree; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
15
|
use Moo; with qw/ |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
19
|
|
|
4
|
|
|
|
|
|
|
Git::Class::Role::Execute |
|
5
|
|
|
|
|
|
|
Git::Class::Role::Cwd |
|
6
|
|
|
|
|
|
|
/; |
|
7
|
3
|
|
|
3
|
|
964
|
use MRO::Compat; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
78
|
|
|
8
|
3
|
|
|
3
|
|
14
|
use Path::Tiny; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
902
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has no_capture => (is => 'rw'); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has '_path' => ( |
|
13
|
|
|
|
|
|
|
is => 'rw', |
|
14
|
|
|
|
|
|
|
# isa => 'Str', |
|
15
|
|
|
|
|
|
|
init_arg => 'path', |
|
16
|
|
|
|
|
|
|
required => 1, |
|
17
|
|
|
|
|
|
|
trigger => sub { |
|
18
|
|
|
|
|
|
|
my ($self, $path) = @_; |
|
19
|
|
|
|
|
|
|
$self->{path} = path($path); |
|
20
|
|
|
|
|
|
|
chdir $path; |
|
21
|
|
|
|
|
|
|
}, |
|
22
|
|
|
|
|
|
|
); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has '_cmd' => ( |
|
25
|
|
|
|
|
|
|
is => 'rw', |
|
26
|
|
|
|
|
|
|
# isa => 'Git::Class::Cmd', |
|
27
|
|
|
|
|
|
|
init_arg => 'cmd', |
|
28
|
|
|
|
|
|
|
builder => '_build__cmd', |
|
29
|
|
|
|
|
|
|
handles => [qw( |
|
30
|
|
|
|
|
|
|
git |
|
31
|
|
|
|
|
|
|
add branch checkout commit config diff fetch init log move |
|
32
|
|
|
|
|
|
|
push pull rebase reset remove show status tag |
|
33
|
|
|
|
|
|
|
)], |
|
34
|
|
|
|
|
|
|
); |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _build__cmd { |
|
37
|
1
|
|
|
1
|
|
5267
|
my $self = shift; |
|
38
|
1
|
|
|
|
|
9
|
require Git::Class::Cmd; |
|
39
|
1
|
|
|
|
|
10
|
return Git::Class::Cmd->new( |
|
40
|
|
|
|
|
|
|
die_on_error => $self->_die_on_error, |
|
41
|
|
|
|
|
|
|
verbose => $self->is_verbose, |
|
42
|
|
|
|
|
|
|
cwd => $self->_path, |
|
43
|
|
|
|
|
|
|
no_capture => $self->no_capture, |
|
44
|
|
|
|
|
|
|
); |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub DEMOLISH { |
|
48
|
1
|
|
|
1
|
1
|
11304
|
my $self = shift; |
|
49
|
|
|
|
|
|
|
|
|
50
|
1
|
50
|
|
|
|
22
|
chdir $self->_cwd if $self->_cwd; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |