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
|
2
|
|
|
2
|
|
87584
|
use warnings; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
59
|
|
10
|
2
|
|
|
2
|
|
10
|
use version; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
41
|
|
11
|
2
|
|
|
2
|
|
365
|
use English qw/ -no_match_vars /; |
|
2
|
|
|
|
|
1646
|
|
|
2
|
|
|
|
|
10
|
|
12
|
2
|
|
|
2
|
|
559
|
use Term::ANSIColor qw/colored/; |
|
2
|
|
|
|
|
2951
|
|
|
2
|
|
|
|
|
10
|
|
13
|
2
|
|
|
2
|
|
1127
|
use App::Git::Workflow::Brs; |
|
2
|
|
|
|
|
7108
|
|
|
2
|
|
|
|
|
1471
|
|
14
|
2
|
|
|
2
|
|
379
|
use App::Git::Workflow::Command qw/get_options/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
82
|
|
15
|
2
|
|
|
2
|
|
403
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
502
|
|
16
|
|
|
|
|
|
|
our $VERSION = version->new(1.1.19); |
17
|
|
|
|
|
|
|
our $workflow = App::Git::Workflow::Brs->new; |
18
|
|
|
|
|
|
|
our ($name) = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs; |
19
|
|
|
|
|
|
|
our %option; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
get_options( |
22
|
|
|
|
|
|
|
\%option, |
23
|
2
|
|
|
2
|
1
|
10
|
'n', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $new_branch = shift @ARGV; |
27
|
|
|
|
|
|
|
if ( ! $new_branch ) { |
28
|
2
|
|
|
|
|
4
|
die "git pushb: no other branch\n"; |
29
|
2
|
100
|
|
|
|
6
|
} |
30
|
1
|
|
|
|
|
6
|
|
31
|
|
|
|
|
|
|
my @lines = $workflow->get_brs(); |
32
|
|
|
|
|
|
|
my ($sha, $current) = $workflow->current(); |
33
|
1
|
|
|
|
|
5
|
|
34
|
1
|
|
|
|
|
9
|
unshift @lines, "$current"; |
35
|
|
|
|
|
|
|
$workflow->git->checkout($new_branch); |
36
|
1
|
|
|
|
|
5
|
|
37
|
1
|
|
|
|
|
6
|
$workflow->set_brs(@lines); |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
6
|
print join ' ', @lines, "\n"; |
40
|
|
|
|
|
|
|
} |
41
|
1
|
|
|
|
|
68
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
git-pushb - Help pushb many commits |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 VERSION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This documentation refers to git-pushb version 1.1.19 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SYNOPSIS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
git-pushb [option] branch |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
OPTIONS: |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
-v --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-pushb |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Change to branch saving the current branch / commit so you can switch back |
67
|
|
|
|
|
|
|
at a point |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 C<run ()> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Executes the git workflow command |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
There are no known bugs in this module. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Patches are welcome. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 AUTHOR |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Copyright (c) 2014 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
98
|
|
|
|
|
|
|
All rights reserved. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
101
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
102
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
103
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
104
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |