From e0b7cf5eb5e6828d07094fa44be67e2d7d63e722 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 27 Jul 2016 22:28:26 +0000 Subject: localize $/ when using chomp Callers may have localized $/ to something else, so make sure we chomp the expected character(s) when calling chomp. --- lib/PublicInbox/Import.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 27f36a7e..bb0811a5 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -38,6 +38,7 @@ sub gfi_start { # wait for other processes to be done flock($lockfh, LOCK_EX) or die "lock failed: $!\n"; + local $/ = "\n"; chomp($self->{tip} = $git->qx(qw(rev-parse --revs-only), $self->{ref})); my @cmd = ('git', "--git-dir=$git_dir", qw(fast-import -- cgit v1.2.3-24-ge0c7