From: Martin Mares Date: Mon, 16 Jul 2012 18:21:36 +0000 (+0200) Subject: Update2: Always show a global diffstat instead of per-commit ones X-Git-Tag: v1.1~10 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=fdefe9a4591b4427f21c4a75765d21dd54ce68c8;p=git-tools.git Update2: Always show a global diffstat instead of per-commit ones --- diff --git a/update2 b/update2 index 5212410..22681de 100755 --- a/update2 +++ b/update2 @@ -127,17 +127,19 @@ if ($old =~ /^0+$/) { print $out "Push to branch $ref ($old -> $new)\n\n"; - # If there are multiple commits, print an overall diffstat first + # If there are multiple commits, mention that if (@nonmerges > 1) { $subj .= ' [' . (scalar @commits) . ' commits]'; print $out 'Pushed ', (scalar @commits), " commits. Overall diffstat:\n\n"; - system 'git', 'diff', '--stat', $old, $new; - print $out "\n"; } + + # Print an overall diffstat + system 'git', 'diff', '--stat', $old, $new; + print $out "\n"; my $pos_after_header = output_size(); - # Show individual commits with diffs and stats - system 'git', 'log', @rev_list_options, @diff_options, '-p', '--stat', "$old..$new"; + # Show individual commits with diffs + system 'git', 'log', @rev_list_options, @diff_options, '-p', "$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) {