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

Re: [PATCH 1/1] clean: show an error message when the path is too long

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jul 16, 2019, 16:13 UTC
Message-ID
<20190716161351.GH20404@szeder.dev>
In-Reply-To
<36677556a26cca9eafd859c88aa9b2c5a6cde309.1563285862.git.gitgitgadget@gmail.com>
On Tue, Jul 16, 2019 at 07:04:23AM -0700, Johannes Schindelin via GitGitGadget wrote:
> +test_expect_success MINGW 'handle clean & core.longpaths = false nicely' '
> +	git config core.longpaths false &&
> +	test_when_finished git config --unset core.longpaths &&

'test_config core.longpaths false' could replace the above two lines with a single one.

> +	a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
> +	mkdir -p $a50$a50/$a50$a50/$a50$a50 &&
> +	touch $a50$a50/test.txt &&
> +	touch $a50$a50/$a50$a50/$a50$a50/test.txt &&

Is there a reason for using 'touch' to create these files here, instead of the usual '>"$file"' shell redirections? Something Windows/MinGW/long path specific, perhaps?

> +	test_must_fail git clean -xdf 2>.git/err &&

I was puzzled when I saw that '2>.git/err' first, because why put that file in the .git directory?! but of course 'git clean' would delete that file if it were in the worktree. OK.

Show 6 quoted lines
> +	grep "too long" .git/err
> +'
> +
>  test_done
> -- 
> gitgitgadget
Previous: Johannes SchindelinNext: Johannes Schindelin via GitGitGadget
Message 7 of 12 in “Show an error if too-long paths are seen by git clean -dfx”
  1. 0/1 Show an error if too-long paths are seen by git clean -dfxJohannes Schindelin via GitGitGadget, Jul 16, 2019
  2. 1/1 clean: show an error message when the path is too longJohannes Schindelin via GitGitGadget, Jul 16, 2019
  3. René ScharfeJul 16, 2019
  4. Junio C HamanoJul 16, 2019
  5. Junio C HamanoJul 17, 2019
  6. Johannes SchindelinJul 18, 2019
  7. SZEDER GáborJul 16, 2019
  8. 0/1 Show an error if too-long paths are seen by git clean -dfxJohannes Schindelin via GitGitGadget, Jul 18, 2019
  9. 1/1 clean: show an error message when the path is too longJohannes Schindelin via GitGitGadget, Jul 18, 2019
  10. Junio C HamanoJul 18, 2019
  11. Johannes SchindelinJul 19, 2019
  12. Junio C HamanoJul 19, 2019

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.