From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Elijah Newren <newren@gmail.com>,
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>,
Patrick Steinhardt <ps@pks.im>,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Subject: Re: [PATCH 2/1] t9300: test verification of renamed paths
Date: Wed, 04 Dec 2024 09:15:28 +0900 [thread overview]
Message-ID: <xmqqed2o717j.fsf@gitster.g> (raw)
In-Reply-To: <20241203210652.GA1413195@coredump.intra.peff.net> (Jeff King's message of "Tue, 3 Dec 2024 16:06:52 -0500")
Jeff King <peff@peff.net> writes:
>> I would say yes, but since this patch too has made it to next and is
>> marked for master, I'm kinda tempted to just leave it as-is...
>
> Is is tempting. :) I wrote this up, though, which can just go on top (of
> en/fast-import-verify-path).
Thanks, queued.
> -- >8 --
> Subject: [PATCH] t9300: test verification of renamed paths
>
> Commit da91a90c2f (fast-import: disallow more path components,
> 2024-11-30) added two separate verify_path() calls (one for
> added/modified files, and one for renames/copies). But our tests only
> exercise the first one. Let's protect ourselves against regressions by
> tweaking one of the tests to rename into the bad path. There are
> adjacent tests that will stay as additions, so now both calls are
> covered.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t9300-fast-import.sh | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
> index e2b1db6bc2..fd01a2353c 100755
> --- a/t/t9300-fast-import.sh
> +++ b/t/t9300-fast-import.sh
> @@ -553,9 +553,16 @@ test_expect_success 'B: fail on invalid file path of .' '
> commit refs/heads/badpath
> committer Name <email> $GIT_COMMITTER_DATE
> data <<COMMIT
> - Commit Message
> + Good path
> + COMMIT
> + M 100644 :1 ok-path
> +
> + commit refs/heads/badpath
> + committer Name <email> $GIT_COMMITTER_DATE
> + data <<COMMIT
> + Bad path
> COMMIT
> - M 100644 :1 ./invalid-path
> + R ok-path ./invalid-path
> INPUT_END
>
> test_when_finished "git update-ref -d refs/heads/badpath" &&
next prev parent reply other threads:[~2024-12-04 0:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 20:47 [PATCH] fast-import: disallow more path components Elijah Newren via GitGitGadget
2024-11-28 0:22 ` Junio C Hamano
2024-11-28 16:12 ` Jeff King
2024-11-30 1:09 ` [PATCH v2] " Elijah Newren via GitGitGadget
2024-12-01 21:40 ` Jeff King
2024-12-03 8:01 ` Elijah Newren
2024-12-03 21:06 ` [PATCH 2/1] t9300: test verification of renamed paths Jeff King
2024-12-03 22:22 ` Elijah Newren
2024-12-04 0:15 ` Junio C Hamano [this message]
2024-12-03 22:17 ` [PATCH v2] fast-import: disallow more path components Junio C Hamano
2024-12-02 1:04 ` 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=xmqqed2o717j.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
--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 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).