line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Git::Workflow::Command::Cat; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2015-06-18 16:41:14 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
18428
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
10
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
11
|
1
|
|
|
1
|
|
495
|
use Pod::Usage (); |
|
1
|
|
|
|
|
40764
|
|
|
1
|
|
|
|
|
27
|
|
12
|
1
|
|
|
1
|
|
728
|
use Data::Dumper qw/Dumper/; |
|
1
|
|
|
|
|
4984
|
|
|
1
|
|
|
|
|
64
|
|
13
|
1
|
|
|
1
|
|
447
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
2815
|
|
|
1
|
|
|
|
|
4
|
|
14
|
1
|
|
|
1
|
|
902
|
use App::Git::Workflow; |
|
1
|
|
|
|
|
37870
|
|
|
1
|
|
|
|
|
45
|
|
15
|
1
|
|
|
1
|
|
532
|
use App::Git::Workflow::Command qw/get_options/; |
|
1
|
|
|
|
|
10583
|
|
|
1
|
|
|
|
|
183
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = 0.1; |
18
|
|
|
|
|
|
|
our $workflow = App::Git::Workflow->new; |
19
|
|
|
|
|
|
|
our ($name) = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs; |
20
|
|
|
|
|
|
|
our %option; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub run { |
23
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
get_options( |
26
|
|
|
|
|
|
|
\%option, |
27
|
|
|
|
|
|
|
'revision|r=s', |
28
|
|
|
|
|
|
|
'quiet|q', |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
0
|
|
|
|
my $revision = $option{revision} || 'HEAD'; |
32
|
0
|
|
|
|
|
|
my $file = shift @ARGV; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
print scalar $workflow->git->show("$revision:$file"); |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__DATA__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
App::Git::Workflow::Command::Cat - Show the content of a git file. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This documentation refers to App::Git::Workflow::Command::Cat version 0.1 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
git-since-release [option] |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
OPTIONS: |
56
|
|
|
|
|
|
|
-q --quiet Suppress notifying of files changed |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
-v --verbose Show more detailed option |
59
|
|
|
|
|
|
|
--VERSION Prints the version information |
60
|
|
|
|
|
|
|
--help Prints this help information |
61
|
|
|
|
|
|
|
--man Prints the full documentation for git-since-release |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
C<git-since-release> finds out how many commits the repository is since the |
66
|
|
|
|
|
|
|
latest release (determined by the latest tag). |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 C<run ()> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Run the command |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
There are no known bugs in this module. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Patches are welcome. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 AUTHOR |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Copyright (c) 2015 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
97
|
|
|
|
|
|
|
All rights reserved. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
100
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
101
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
102
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
103
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |