From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Joseph Mingrone <jrm@ftfl.ca>,
garga@FreeBSD.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Eric Wong <e@80x24.org>
Subject: Re: [PATCH] git-svn: avoid warning on undef readline()
Date: Sat, 7 Apr 2018 19:20:23 +0000 [thread overview]
Message-ID: <20180407192022.GD9954@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20180406131514.740-1-avarab@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
On Fri, Apr 06, 2018 at 01:15:14PM +0000, Ævar Arnfjörð Bjarmason wrote:
> Change code in Git.pm that sometimes calls chomp() on undef to only do
> so the value is defined.
>
> This code has been chomping undef values ever since it was added in
> b26098fc2f ("git-svn: reduce scope of input record separator change",
> 2016-10-14), but started warning due to the introduction of "use
> warnings" to Git.pm in my f0e19cb7ce ("Git.pm: add the "use warnings"
> pragma", 2018-02-25) released with 2.17.0.
>
> Since this function will return undef in those cases it's still
> possible that the code using it will warn if it does a chomp of its
> own, as the code added in b26098fc2f ("git-svn: reduce scope of input
> record separator change", 2016-10-14) might do, but since git-svn has
> "use warnings" already that's clearly not a codepath that's going to
> warn.
Thanks for this patch. I ran into this earlier this week (with git svn
fetch) and had intended to send a patch, but you clearly got to it
before I did.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]
prev parent reply other threads:[~2018-04-07 19:20 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
2018-04-07 19:20 ` brian m. carlson [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180407192022.GD9954@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=e@80x24.org \
--cc=garga@FreeBSD.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).