git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Štěpán Němec" <stepnem@smrk.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] test-lib: make sure TEST_DIRECTORY has no trailing slash
Date: Wed, 04 Oct 2023 11:24:10 -0700	[thread overview]
Message-ID: <xmqqpm1up7p1.fsf@gitster.g> (raw)
In-Reply-To: <20231004194046+0200.353534-stepnem@smrk.net> ("Štěpán Němec"'s message of "Wed, 04 Oct 2023 19:40:46 +0200")

Štěpán Němec <stepnem@smrk.net> writes:

> The $PWD inside the test is the trash directory, though, so that's not
> the problematic $PWD with a trailing slash any more, so I guess this
> problem can't really happen in a test that follows the '. ./test-lib.sh'
> (which does cd -P "$TRASH_DIRECTORY") convention?

Yeah, after the dot-include of test-lib.sh returns, everything
should be safe.  What happens inside test-lib.sh (and worse yet,
inside future versions of that file) before that "cd -P" is what
the extra-carefulness protects against.

      reply	other threads:[~2023-10-04 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  8:23 [PATCH] test-lib: make sure TEST_DIRECTORY has no trailing slash Štěpán Němec
2023-10-03 21:21 ` Junio C Hamano
2023-10-03 21:57   ` Junio C Hamano
2023-10-04  9:34     ` Štěpán Němec
2023-10-04 16:19       ` Junio C Hamano
2023-10-04 17:01         ` Štěpán Němec
2023-10-04 17:15           ` Junio C Hamano
2023-10-04 17:40             ` Štěpán Němec
2023-10-04 18:24               ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpm1up7p1.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=stepnem@smrk.net \
    /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).