mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
log2changes: correct command line, fix tag usage, change Version output
--decorate=full is needed with my git 1.7.1 to get the necessary output so that the previous edit would work to extract the Version stuff. ... but I had to edit how the refs/tags was extracted since it had a little flaw that made it miss the 7.20.1 output. Finally, I changed so that Version is outputted even more similar to how CHANGES does it.
This commit is contained in:
parent
8e7ec794f5
commit
d8383220ec
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# git log --pretty=fuller --no-color --date=short --decorate
|
# git log --pretty=fuller --no-color --date=short --decorate=full
|
||||||
|
|
||||||
my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
|
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
|
||||||
@ -32,7 +32,7 @@ while(<STDIN>) {
|
|||||||
if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
|
if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
|
||||||
$co = $1;
|
$co = $1;
|
||||||
my $ref = $2;
|
my $ref = $2;
|
||||||
if ($ref =~ /refs\/tags\/curl-(.*)\)/) {
|
if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) {
|
||||||
$tag = $1;
|
$tag = $1;
|
||||||
$tag =~ tr/_/./;
|
$tag =~ tr/_/./;
|
||||||
} else {
|
} else {
|
||||||
@ -50,16 +50,17 @@ while(<STDIN>) {
|
|||||||
}
|
}
|
||||||
elsif($l =~ /^( )(.*)/) {
|
elsif($l =~ /^( )(.*)/) {
|
||||||
my $extra;
|
my $extra;
|
||||||
|
if ($tag) {
|
||||||
|
# Version entries have a special format
|
||||||
|
print "\nVersion " . $tag." ($date)\n";
|
||||||
|
$oldc = "";
|
||||||
|
}
|
||||||
if($a ne $c) {
|
if($a ne $c) {
|
||||||
$extra=sprintf("\n- [%s brought this change]\n\n ", $a);
|
$extra=sprintf("\n- [%s brought this change]\n\n ", $a);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$extra="\n- ";
|
$extra="\n- ";
|
||||||
}
|
}
|
||||||
if ($tag) {
|
|
||||||
# Version entries have a special format
|
|
||||||
$c = "Version " . $tag;
|
|
||||||
}
|
|
||||||
if($co ne $oldco) {
|
if($co ne $oldco) {
|
||||||
if($c ne $oldc) {
|
if($c ne $oldc) {
|
||||||
print "\n$c ($date)$extra";
|
print "\n$c ($date)$extra";
|
||||||
|
Loading…
Reference in New Issue
Block a user