git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Patrick Steinhardt <ps@pks.im>,  git@vger.kernel.org
Subject: Re: [PATCH v2 3/3] t9164: fix inability to find basename(1) in hooks
Date: Thu, 09 Nov 2023 02:43:02 +0900	[thread overview]
Message-ID: <xmqqwmus3zvd.fsf@gitster.g> (raw)
In-Reply-To: <20231108172125.GD1028115@coredump.intra.peff.net> (Jeff King's message of "Wed, 8 Nov 2023 12:21:25 -0500")

Jeff King <peff@peff.net> writes:

> ... But the more robust way to do it is:
>
>   # export ORIG_PATH, which presumably is not cleared the same way PATH
>   # is, so that the hook can access it
>   ORIG_PATH=$PATH &&
>   export ORIG_PATH &&
>
>   cat >"$hook" <<EOF
>   # pull the original path from the caller
>   PATH=$ORIG_PATH
>   export PATH
>
>   ...do other stuff...
>   EOF
>
> That's assuming that environment variables make it intact to the hook at
> all (it is not clear to me why the original $PATH doesn't).

Yeah, the parenthetical comment points at the crux of the issue.  I
can tell from the patch what issue the platform throws at us we are
trying to work around, but it is frustrating not to know why the
platform does such unpleasant things in the first place.

Thanks.

  reply	other threads:[~2023-11-08 17:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08  7:29 [PATCH 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-08  7:29 ` [PATCH 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-08  7:59   ` Junio C Hamano
2023-11-08 10:42     ` Patrick Steinhardt
2023-11-08 16:44       ` Jeff King
2023-11-08  7:30 ` [PATCH 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-08  8:01   ` Junio C Hamano
2023-11-08  7:30 ` [PATCH 3/3] t9164: fix inability to find basename(1) in hooks Patrick Steinhardt
2023-11-08 14:57 ` [PATCH v2 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-08 14:57   ` [PATCH v2 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-08 16:54     ` Jeff King
2023-11-09  0:30       ` Junio C Hamano
2023-11-09  6:30       ` Patrick Steinhardt
2023-11-08 14:57   ` [PATCH v2 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-08 17:02     ` Jeff King
2023-11-08 14:57   ` [PATCH v2 3/3] t9164: fix inability to find basename(1) in hooks Patrick Steinhardt
2023-11-08 17:21     ` Jeff King
2023-11-08 17:43       ` Junio C Hamano [this message]
2023-11-09  6:30         ` Patrick Steinhardt
2023-11-09  7:02           ` Patrick Steinhardt
2023-11-09  7:09 ` [PATCH v3 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-09  7:09   ` [PATCH v3 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-09  7:32     ` Jeff King
2023-11-09  7:36       ` Patrick Steinhardt
2023-11-09  7:46         ` Junio C Hamano
2023-11-09  7:57           ` Patrick Steinhardt
2023-11-09  7:48         ` Jeff King
2023-11-09  7:09   ` [PATCH v3 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-09  7:10   ` [PATCH v3 3/3] t9164: fix inability to find basename(1) in Subversion hooks Patrick Steinhardt
2023-11-09  7:35     ` Jeff King
2023-11-09  7:36   ` [PATCH v3 0/3] t: improve compatibility with NixOS Jeff King
2023-11-10  8:16 ` [PATCH v4 " Patrick Steinhardt
2023-11-10  8:17   ` [PATCH v4 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-11  0:00     ` Junio C Hamano
2023-11-13  7:15       ` Patrick Steinhardt
2023-11-10  8:17   ` [PATCH v4 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-10  8:17   ` [PATCH v4 3/3] t9164: fix inability to find basename(1) in Subversion hooks Patrick Steinhardt
2023-11-10 21:41   ` [PATCH v4 0/3] t: improve compatibility with NixOS Jeff King
2023-11-11  0:10   ` Junio C Hamano
2023-11-13  7:15     ` Patrick Steinhardt
2023-11-13 23:42       ` Junio C Hamano

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=xmqqwmus3zvd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /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).