git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] modify the “foo" file path to "$PWD/bad-clone/sub/foo".

From
Justin Tobler <jltobler@gmail.com>
Date
Jul 30, 2025, 18:08 UTC
Message-ID
<r3q4uyx6725ryuxnvnpidyaglptytro25pw4l53tg4vypkdruh@fmsgo5c6r4qd>
In-Reply-To
<xmqq5xf9n0jf.fsf@gitster.g>
On 25/07/30 08:47AM, Junio C Hamano wrote:
Show 15 quoted lines
> "陈建虎 via GitGitGadget" <gitgitgadget@gmail.com> writes:
> > From: =?UTF-8?q?=E9=99=88=E5=BB=BA=E8=99=8E?= <chenjianhu@kylinos.cn>
> 
> Justin, who wrote the test originally, Cc'ed for comments.
> 
> > diff --git a/t/t7450-bad-git-dotfiles.sh b/t/t7450-bad-git-dotfiles.sh
> > index 14b5743b962..f512eed278c 100755
> > --- a/t/t7450-bad-git-dotfiles.sh
> > +++ b/t/t7450-bad-git-dotfiles.sh
> > @@ -401,7 +401,7 @@ test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into d
> >  	git -C repo commit -m submodule &&
> >  
> >  	git -c protocol.file.allow=always clone --recurse-submodules repo bad-clone &&
> > -	! test -f "$PWD/foo" &&
> > +	! test -f "$PWD/bad-clone/sub/foo" &&

This assertion is supposed to validate that the post-checkout hook did not execute. The path here is incorrect indeed. I've tested the fix here and it works as expected. Thanks

> >  	test -f $(printf "bad-clone/sub\r/post-checkout")

The second assertion here still demonstrates that a file was not checked out into an arbitrary location, which is the root of the problem, and likely why I missed this. Apologies.

-Justin
Previous: Junio C HamanoNext: chenjianhu via GitGitGadget
Message 5 of 8 in “modify the “foo" file path to "$PWD/bad-clone/sub/foo".”
  1. modify the “foo" file path to "$PWD/bad-clone/sub/foo".陈建虎 via GitGitGadget, Jul 30, 2025
  2. Kristoffer HaugsbakkJul 30, 2025
  3. Junio C HamanoJul 30, 2025
  4. Junio C HamanoJul 30, 2025
  5. Justin ToblerJul 30, 2025
  6. t7450: inspect the correct path a broken code would write tochenjianhu via GitGitGadget, Jul 31, 2025
  7. Junio C HamanoJul 31, 2025
  8. Justin ToblerAug 1, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.