git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org, "Joseph Mingrone" <jrm@ftfl.ca>,
	garga@FreeBSD.org,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Ben Caradoc-Davies" <ben@transient.nz>,
	894997@bugs.debian.org
Subject: Re: [PATCH] git-svn: avoid warning on undef readline()
Date: Mon, 09 Apr 2018 11:09:07 +0900	[thread overview]
Message-ID: <xmqqa7ud6sho.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180406165618.GA6367@80x24.org> (Eric Wong's message of "Fri, 6 Apr 2018 16:56:18 +0000")

Eric Wong <e@80x24.org> writes:

> Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>> See https://public-inbox.org/git/86h8oobl36.fsf@phe.ftfl.ca/ for the
>> original report.
>
> Thanks for taking a look at this.  Also https://bugs.debian.org/894997
>
>> --- a/perl/Git.pm
>> +++ b/perl/Git.pm
>> @@ -554,7 +554,7 @@ sub get_record {
>>  	my ($fh, $rs) = @_;
>>  	local $/ = $rs;
>>  	my $rec = <$fh>;
>> -	chomp $rec if defined $rs;
>> +	chomp $rec if defined $rs and defined $rec;
>
> I'm struggling to understand the reason for the "defined $rs"
> check.  I think it was a braino on my part and meant to use:
>
> 	chomp $rec if defined $rec;

That sounds quite plausible, so if there is no further discussion,
let me queue a version that does s/rs/rec/ on that line myself
(bypassing a pull from your repository at bogomips.org/).

Thanks.



  parent reply	other threads:[~2018-04-09  2:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 12:01 git 2.17.0: uninitialized value $rec in scalar chomp at ...Git.pm line 557 Joseph Mingrone
2018-04-06 12:21 ` Johannes Schindelin
2018-04-06 12:32   ` Joseph Mingrone
2018-04-06 13:15 ` [PATCH] git-svn: avoid warning on undef readline() Ævar Arnfjörð Bjarmason
2018-04-06 14:30   ` Johannes Schindelin
2018-04-06 16:56   ` Eric Wong
2018-04-06 18:23     ` Ævar Arnfjörð Bjarmason
2018-04-06 20:49       ` Eric Wong
2018-04-06 21:05         ` Ævar Arnfjörð Bjarmason
2018-04-09  2:09     ` Junio C Hamano [this message]
2018-04-07 19:20   ` brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa7ud6sho.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=894997@bugs.debian.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=ben@transient.nz \
    --cc=e@80x24.org \
    --cc=garga@FreeBSD.org \
    --cc=git@vger.kernel.org \
    --cc=jrm@ftfl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).