my $out = File::Temp->new() or die;
my $outname = $out->filename;
$out->autoflush(1);
+open ORIG_STDOUT, '>&', \*STDOUT;
close STDOUT;
open STDOUT, '>&', $out or die;
my $pos_after_header = output_size();
# Show individual commits with diffs and stats
- system 'git', 'log', @rev_list_options, '--reverse', @diff_options, '-p', '--stat', "$old..$new";
+ system 'git', 'log', @rev_list_options, @diff_options, '-p', '--stat', "$old..$new";
# If the file is too long, truncate it and print just a summary
if (defined($max_diff_size) && output_size() > $max_diff_size) {
$out->truncate($pos_after_header);
output_size();
print $out "Diff was too long, printing just a summary.\n\n";
- system 'git', 'log', @rev_list_options, '--reverse', "$old..$new";
+ system 'git', 'log', @rev_list_options, "$old..$new";
}
} elsif ($lca eq $new) {
# Rewind
'-s', $subj,
$mail_to;
} else {
- print STDERR "Subject: $subj\n\n";
- `cat >&2 $outname`;
+ open STDOUT, '>&', \*ORIG_STDOUT;
+ print "Subject: $subj\n\n";
+ system 'cat', $outname;
}