summaryrefslogtreecommitdiff
path: root/src/tools/git_changelog
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/git_changelog')
-rwxr-xr-xsrc/tools/git_changelog56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/tools/git_changelog b/src/tools/git_changelog
index b3892f46511..14b94720282 100755
--- a/src/tools/git_changelog
+++ b/src/tools/git_changelog
@@ -69,24 +69,24 @@ my @BRANCHES = qw(master
# Might want to make this parameter user-settable.
my $timestamp_slop = 24 * 60 * 60;
-my $brief = 0;
-my $details_after = 0;
-my $post_date = 0;
-my $master_only = 0;
+my $brief = 0;
+my $details_after = 0;
+my $post_date = 0;
+my $master_only = 0;
my $non_master_only = 0;
-my $oldest_first = 0;
+my $oldest_first = 0;
my $since;
my @output_buffer;
my $output_line = '';
Getopt::Long::GetOptions(
- 'brief' => \$brief,
- 'details-after' => \$details_after,
- 'master-only' => \$master_only,
+ 'brief' => \$brief,
+ 'details-after' => \$details_after,
+ 'master-only' => \$master_only,
'non-master-only' => \$non_master_only,
- 'post-date' => \$post_date,
- 'oldest-first' => \$oldest_first,
- 'since=s' => \$since) || usage();
+ 'post-date' => \$post_date,
+ 'oldest-first' => \$oldest_first,
+ 'since=s' => \$since) || usage();
usage() if @ARGV;
my @git = qw(git log --format=fuller --date=iso);
@@ -104,7 +104,7 @@ my %rel_tags;
if ($line =~ m|^([a-f0-9]+)\s+commit\s+refs/tags/(\S+)|)
{
my $commit = $1;
- my $tag = $2;
+ my $tag = $2;
if ( $tag =~ /^REL_\d+_\d+$/
|| $tag =~ /^REL\d+_\d+$/
|| $tag =~ /^REL\d+_\d+_\d+$/)
@@ -152,10 +152,10 @@ for my $branch (@BRANCHES)
push_commit(\%commit) if %commit;
$last_tag = $rel_tags{$1} if defined $rel_tags{$1};
%commit = (
- 'branch' => $branch,
- 'commit' => $1,
+ 'branch' => $branch,
+ 'commit' => $1,
'last_tag' => $last_tag,
- 'message' => '',);
+ 'message' => '',);
if ($line =~ /^commit\s+\S+\s+(\S+)/)
{
$last_parent = $1;
@@ -195,7 +195,7 @@ for my $branch (@BRANCHES)
for my $cc (@{ $all_commits_by_branch{'master'} })
{
my $commit = $cc->{'commit'};
- my $c = $cc->{'commits'}->[0];
+ my $c = $cc->{'commits'}->[0];
$last_tag = $rel_tags{$commit} if defined $rel_tags{$commit};
if (defined $sprout_tags{$commit})
{
@@ -243,7 +243,7 @@ while (1)
if (!defined $best_branch
|| $leader->{'timestamp'} > $best_timestamp)
{
- $best_branch = $branch;
+ $best_branch = $branch;
$best_timestamp = $leader->{'timestamp'};
}
}
@@ -291,8 +291,8 @@ print @output_buffer if ($oldest_first);
sub push_commit
{
my ($c) = @_;
- my $ht = hash_commit($c);
- my $ts = parse_datetime($c->{'date'});
+ my $ht = hash_commit($c);
+ my $ts = parse_datetime($c->{'date'});
my $cc;
# Note that this code will never merge two commits on the same branch,
@@ -316,10 +316,10 @@ sub push_commit
if (!defined $cc)
{
$cc = {
- 'author' => $c->{'author'},
- 'message' => $c->{'message'},
- 'commit' => $c->{'commit'},
- 'commits' => [],
+ 'author' => $c->{'author'},
+ 'message' => $c->{'message'},
+ 'commit' => $c->{'commit'},
+ 'commits' => [],
'timestamp' => $ts
};
push @{ $all_commits{$ht} }, $cc;
@@ -327,9 +327,9 @@ sub push_commit
# stash only the fields we'll need later
my $smallc = {
- 'branch' => $c->{'branch'},
- 'commit' => $c->{'commit'},
- 'date' => $c->{'date'},
+ 'branch' => $c->{'branch'},
+ 'commit' => $c->{'commit'},
+ 'date' => $c->{'date'},
'last_tag' => $c->{'last_tag'}
};
push @{ $cc->{'commits'} }, $smallc;
@@ -385,9 +385,9 @@ sub output_details
output_str(
"%s [%s] %s\n",
- substr($c->{'date'}, 0, 10),
+ substr($c->{'date'}, 0, 10),
substr($c->{'commit'}, 0, 9),
- substr($1, 0, 56));
+ substr($1, 0, 56));
}
else
{