git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Luke Diamand <luke@diamand.org>
Cc: git@vger.kernel.org, Yang Zhao <yang.zhao@skyboxlabs.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning
Date: Thu, 30 Jan 2020 12:22:24 -0800	[thread overview]
Message-ID: <xmqqv9osbsov.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200130115034.6191-2-luke@diamand.org> (Luke Diamand's message of "Thu, 30 Jan 2020 11:50:34 +0000")

Luke Diamand <luke@diamand.org> writes:

> Spotted by Eric Sunshine:
>
>     https://public-inbox.org/git/CAPig+cRx3hG64nuDie69o_gdX39F=sR6D8LyA7J1rCErgu0aMA@mail.gmail.com/
>
> Signed-off-by: Luke Diamand <luke@diamand.org>
> ---
>  git-p4.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/git-p4.py b/git-p4.py
> index eb5bc28cf9..9a71a6690d 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -3563,7 +3563,8 @@ def importRevisions(self, args, branch_arg_given):
>          changes = []
>  
>          if len(self.changesFile) > 0:
> -            output = open(self.changesFile).readlines()
> +            with open(self.changesFile) as f:
> +                output = f.readlines()
>              changeSet = set()
>              for line in output:
>                  changeSet.add(int(line))

I was scratching my head until I realized that this is PATCH 7/6 of
the other 6-patch series.

Will queue together with the other ones.  Thanks.

      reply	other threads:[~2020-01-30 20:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 11:50 [PATCHv1 0/1] git-p4: fix file descriptor leak Luke Diamand
2020-01-30 11:50 ` [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning Luke Diamand
2020-01-30 20:22   ` Junio C Hamano [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=xmqqv9osbsov.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=luke@diamand.org \
    --cc=sunshine@sunshineco.com \
    --cc=yang.zhao@skyboxlabs.com \
    /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).