line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# Created on: 2014-03-11 20:58:59 |
3
|
|
|
|
|
|
|
# Create by: Ivan Wills |
4
|
|
|
|
|
|
|
# $Id$ |
5
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
6
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use strict; |
9
|
1
|
|
|
1
|
|
791
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
4
|
use version; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
11
|
1
|
|
|
1
|
|
5
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
12
|
1
|
|
|
1
|
|
61
|
use Term::ANSIColor qw/colored/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
13
|
1
|
|
|
1
|
|
288
|
use App::Git::Workflow; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
14
|
1
|
|
|
1
|
|
5
|
use App::Git::Workflow::Command qw/get_options/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
15
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
244
|
|
16
|
|
|
|
|
|
|
our $VERSION = version->new(1.1.20); |
17
|
|
|
|
|
|
|
our $workflow = App::Git::Workflow->new; |
18
|
|
|
|
|
|
|
our ($name) = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs; |
19
|
|
|
|
|
|
|
our %option; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
get_options( |
22
|
|
|
|
|
|
|
\%option, |
23
|
0
|
|
|
0
|
1
|
|
'all|a', |
24
|
|
|
|
|
|
|
'insensitive|i', |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $search = shift @ARGV; |
28
|
|
|
|
|
|
|
my @shas = map {/([a-fA-F\d]+)/; $1} `git rev-list --remotes`; |
29
|
0
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
for my $sha (@shas) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $log = `git log -n 1 --name-status --oneline $sha`; |
32
|
0
|
|
|
|
|
|
if ( $log =~ /$search/ ) { |
33
|
0
|
|
|
|
|
|
print "$sha\n"; |
34
|
0
|
0
|
|
|
|
|
} |
35
|
0
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
git-search - grep for branch names |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This documentation refers to git-search version 1.1.20 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
git-search [--remote|-r|--all|-a] regex |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
OPTIONS: |
54
|
|
|
|
|
|
|
regex grep's perl (-P) regular expression |
55
|
|
|
|
|
|
|
-r --remote List all remote branches |
56
|
|
|
|
|
|
|
-a --all List all branches |
57
|
|
|
|
|
|
|
-v Find all branches that don't match regex |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
--verbose Show more detailed option |
60
|
|
|
|
|
|
|
--version Prints the version information |
61
|
|
|
|
|
|
|
--help Prints this help information |
62
|
|
|
|
|
|
|
--man Prints the full documentation for git-search |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Short hand for running |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
C<git branch (-r|-a)? | grep -P 'regex'> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 C<run ()> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Executes the git workflow command |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
There are no known bugs in this module. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Patches are welcome. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Copyright (c) 2014 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
99
|
|
|
|
|
|
|
All rights reserved. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
102
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
103
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
104
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
105
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |