From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>, Johannes Sixt <j6t@kdbg.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] mingw: simplify PATH handling
Date: Mon, 22 May 2017 14:58:27 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1705221457520.3610@virtualbox> (raw)
In-Reply-To: <f4119dba-0e25-0a0b-0796-dc4c3d4d1cc5@web.de>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
Hi René,
On Sat, 20 May 2017, René Scharfe wrote:
> On Windows the environment variable PATH contains a semicolon-separated
> list of directories to search for, in order, when looking for the
> location of a binary to run. get_path_split() parses it and returns an
> array of string copies, which is iterated by path_lookup(), which in
> turn passes each entry to lookup_prog().
>
> Change lookup_prog() to take the directory name as a length-limited
> string instead of as a NUL-terminated one and parse PATH directly in
> path_lookup(). This avoids memory allocations, simplifying the code.
>
> Helped-by: Johannes Sixt <j6t@kdbg.org>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
ACK.
> Rebased against Junio's master, fixed string overrun. Can hold and
> resubmit in a few months if it gets in the way right now.
I am in favor of getting this in as soon as possible.
Ciao,
Dscho
prev parent reply other threads:[~2017-05-22 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 15:29 [PATCH] mingw: simplify PATH handling René Scharfe
2017-05-20 17:00 ` Johannes Sixt
2017-05-20 19:35 ` René Scharfe
2017-05-20 19:35 ` [PATCH v2] " René Scharfe
2017-05-22 12:58 ` Johannes Schindelin [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1.1705221457520.3610@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=l.s.r@web.de \
/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).