From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Mark Mentovai <mark@chromium.org>,
Git Development <git@vger.kernel.org>,
Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH] t7900: use pwd -P in macOS maintenance test
Date: Fri, 23 May 2025 14:51:44 -0700 [thread overview]
Message-ID: <xmqq7c27vvv3.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cQLG+zveZg73E=TiC5uShhhRXKmK5Z_M8zN3fpGNEN1ng@mail.gmail.com> (Eric Sunshine's message of "Fri, 23 May 2025 17:24:38 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> Hmm, I'm not sure how that would help this particular case which wants
> to know the path of $HOME:
>
> pfx=$(cd "$HOME" && pwd -P) &&
We set HOME to TRASH_DIRECTORY during test, so HOME would not be all
that special.
I thought one of the issues was on Windows "-P" in "pwd -P" is a
no-op? So if you want to fix it locally perhaps
pfx=$(cd -P "$HOME" && pwd)
but I think the true issue may be that we set up fake HOME using
TRASH_DIRECTORY that is before we canonicalize it with "cd -P".
Would doing something like this (without any other changes we
discussed so far) help?
t/test-lib.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git c/t/test-lib.sh w/t/test-lib.sh
index af722d383d..92d0db13d7 100644
--- c/t/test-lib.sh
+++ w/t/test-lib.sh
@@ -1577,6 +1577,8 @@ fi
# Use -P to resolve symlinks in our working directory so that the cwd
# in subprocesses like git equals our $PWD (for pathname comparisons).
cd -P "$TRASH_DIRECTORY" || BAIL_OUT "cannot cd -P to \"$TRASH_DIRECTORY\""
+TRASH_DIRECTORY=$(pwd)
+HOME="$TRASH_DIRECTORY"
start_test_output "$0"
next prev parent reply other threads:[~2025-05-23 21:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 19:37 [PATCH] t7900: use pwd -P in macOS maintenance test Mark Mentovai
2025-05-23 20:08 ` Eric Sunshine
2025-05-23 20:42 ` Junio C Hamano
2025-05-23 21:24 ` Eric Sunshine
2025-05-23 21:51 ` Junio C Hamano [this message]
2025-05-24 4:39 ` Mark Mentovai
2025-05-27 17:19 ` Junio C Hamano
2025-05-23 20:43 ` Mark Mentovai
2025-05-23 21:36 ` Eric Sunshine
2025-05-28 20:17 ` [PATCH v2] t: run tests from a normalized working directory Mark Mentovai
2025-05-28 23:08 ` Torsten Bögershausen
2025-05-30 5:04 ` Junio C Hamano
2025-05-31 5:46 ` Torsten Bögershausen
2025-06-01 16:38 ` Junio C Hamano
2025-06-02 16:08 ` Mark Mentovai
2025-06-02 21:32 ` Junio C Hamano
2025-06-03 5:02 ` Torsten Bögershausen
2025-06-03 13:15 ` Mark Mentovai
2025-06-03 18:22 ` 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=xmqq7c27vvv3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mark@chromium.org \
--cc=stolee@gmail.com \
--cc=sunshine@sunshineco.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.