From 378f31ff9e00e38a45e0973bd72a6b2dc46dea28 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 7 Apr 2013 00:23:36 +0200 Subject: [PATCH] Update2: An attempt at better recognition of merges Merge log messages are more complex than I previously thought. --- update2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/update2 b/update2 index 7d62853..d0e05fb 100755 --- a/update2 +++ b/update2 @@ -124,10 +124,15 @@ sub update_branch($$$$$) my $c0 = $commits[0]; my $n0 = $nonmerges[0]; my $c0p = $c0->{parents}; + if (@{$c0p} == 2 && ($c0p->[0] eq $old || $c0p->[1] eq $old) && - $c0->{subject} =~ m{^\s*Merge branch '([^']*)' into (\S+)} && - (($1 eq $branch) != ($2 eq $branch))) { + ( + $c0->{subject} =~ m{^\s*Merge branch '([^']*)' into (\S+)} && + ($1 eq $branch) != ($2 eq $branch) + ) || ( + $c0->{subject} =~ m{^\s*Merge branch '([^']*)'( of |$)} + )) { # Pushed a merge of the current branch with another local branch $subj .= ' ' . $c0->{subject}; } elsif ($n0) { -- 2.39.2