summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-10-14 00:27:53 (GMT)
committerEric Wong <e@80x24.org>2016-10-14 01:36:05 (GMT)
commitb26098fc2f76131f4258d800e0892e87f9138331 (patch)
tree5e594a70e499b0b18f02f7ff887fa2b60fed713f /git-svn.perl
parent3cdd5d19178a54d2e51b5098d43b57571241d0ab (diff)
downloadgit-b26098fc2f76131f4258d800e0892e87f9138331.zip
git-b26098fc2f76131f4258d800e0892e87f9138331.tar.gz
git-b26098fc2f76131f4258d800e0892e87f9138331.tar.bz2
git-svn: reduce scope of input record separator change
Reducing the scope of where we change the record separator ($/) avoids bugs in calls which rely on the input record separator further down, such as the 'chomp' usage in command_oneline. This is necessary for a future change to git-svn, but exists in Git.pm since it seems useful for gitweb and our other Perl scripts, too. Signed-off-by: Eric Wong <e@80x24.org>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 4d41d22..6d1a142 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -44,6 +44,7 @@ use Git qw(
command_close_pipe
command_bidi_pipe
command_close_bidi_pipe
+ get_record
);
BEGIN {
@@ -1880,10 +1881,9 @@ sub get_commit_entry {
{
require Encode;
# SVN requires messages to be UTF-8 when entering the repo
- local $/;
open $log_fh, '<', $commit_msg or croak $!;
binmode $log_fh;
- chomp($log_entry{log} = <$log_fh>);
+ chomp($log_entry{log} = get_record($log_fh, undef));
my $enc = Git::config('i18n.commitencoding') || 'UTF-8';
my $msg = $log_entry{log};