diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-05-24 21:12:29 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-24 21:12:29 (GMT) |
commit | dfe39c3fe194db1fd15877887aaa61538def7060 (patch) | |
tree | f16e3708915be39588114d0efc5bf921b026f959 /Reintegrate | |
parent | f59f24d3993e5f631bc203a12dff8e03d094f3f6 (diff) | |
download | git-dfe39c3fe194db1fd15877887aaa61538def7060.zip git-dfe39c3fe194db1fd15877887aaa61538def7060.tar.gz git-dfe39c3fe194db1fd15877887aaa61538def7060.tar.bz2 |
Reintegrate: remove the "what next" markers from log messages
Diffstat (limited to 'Reintegrate')
-rwxr-xr-x | Reintegrate | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Reintegrate b/Reintegrate index da69ce5..8052dda 100755 --- a/Reintegrate +++ b/Reintegrate @@ -25,6 +25,16 @@ annotate_merge () { test -f Meta/whats-cooking.txt || return 0 perl -e ' + sub wildo_match { + s/^\s*//; + if (/^Will (?:\S+ ){0,2}(fast-track|keep|merge|drop|discard|cook|kick|defer|be re-?rolled)[,. ]/ || + /^Not urgent/ || /^Not ready/ || /^Waiting for / || + /^Needs? / || /^Expecting / || /^May want to /) { + return 1; + } + return 0; + } + my ($branch) = $ARGV[0]; my ($in_section, $in_desc); my @msg = (); @@ -41,12 +51,15 @@ annotate_merge () { $in_desc = 1; } next unless ($in_section && $in_desc); + next if (/Originally merged to '\''next'\'' on ([-0-9]+)/); + next if (wildo_match($_)); push @msg, "$_\n"; } if ($in_section && @msg) { open(my $fh, "-|", qw(git cat-file commit HEAD)); my @original = (<$fh>); + close $fh; my @final; $in_section = 0; for (@original) { @@ -54,6 +67,13 @@ annotate_merge () { $in_section = 1 if (/^$/); next; } + if (/^Conflicts:$/ && $in_section == 2) { + $in_section = 3; + } + + if ($in_section == 3) { + $_ = "# $_"; + } push @final, $_; if (/^$/ && $in_section == 1) { push @final, @msg; @@ -61,7 +81,6 @@ annotate_merge () { $in_section = 2; } } - close $fh; open($fh, "|-", qw(git commit --amend -F -)); print $fh @final; close $fh; |