diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl index 616bb521cb..c34ddc5d5e 100755 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@ -43,6 +43,7 @@ sub current_branch { my $fh; open $fh, '-|', 'git-symbolic-ref', 'HEAD' or die "$!"; my ($bra) = <$fh>; + chomp($bra); $bra =~ s|^refs/heads/||; if ($bra ne 'master') { $bra = " into $bra";