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