|
|
@ -3,10 +3,22 @@ |
|
|
|
sub create_patches { |
|
|
|
sub create_patches { |
|
|
|
my $tag=shift; |
|
|
|
my $tag=shift; |
|
|
|
my $pdir=shift; |
|
|
|
my $pdir=shift; |
|
|
|
my $num=0; |
|
|
|
my $n=1; |
|
|
|
open( GIT, 'git format-patch -M -N --no-signature -o "'.$pdir.'" '.$tag.' |'); |
|
|
|
my @lines; |
|
|
|
@lines=<GIT>; |
|
|
|
|
|
|
|
close GIT; # be done |
|
|
|
mkdir $pdir, 0755; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
open( GIT, 'git log -p --pretty=email --stat -m --first-parent --reverse '.$tag.'..HEAD |'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (<GIT>) { |
|
|
|
|
|
|
|
if (/^From [a-z0-9]{40} .*$/) { |
|
|
|
|
|
|
|
my $fname = sprintf("%04d", $n++).".patch"; |
|
|
|
|
|
|
|
push @lines, $fname; |
|
|
|
|
|
|
|
open FH, ">".$pdir."/".$fname; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
print FH; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return @lines; |
|
|
|
return @lines; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -35,7 +47,7 @@ while(<>) { |
|
|
|
$num=1; |
|
|
|
$num=1; |
|
|
|
for(@patches) { |
|
|
|
for(@patches) { |
|
|
|
s/.*\///g; |
|
|
|
s/.*\///g; |
|
|
|
print "Patch$num: $_"; |
|
|
|
print "Patch$num: $_\n"; |
|
|
|
$num++; |
|
|
|
$num++; |
|
|
|
} |
|
|
|
} |
|
|
|
print "\n"; |
|
|
|
print "\n"; |
|
|
|