Re: [PATCH v3 1/1] worktree add: sanitize worktree names
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 4, 2019, 15:06 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1903041603320.45@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190226105851.32273-2-pclouds@gmail.com>
Hi Duy,
On Tue, 26 Feb 2019, Nguyễn Thái Ngọc Duy wrote:
Show 16 quoted lines
> diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh > index 286bba35d8..ea22207361 100755 > --- a/t/t2025-worktree-add.sh > +++ b/t/t2025-worktree-add.sh > @@ -570,4 +570,11 @@ test_expect_success '"add" an existing locked but missing worktree' ' > git worktree add --force --force --detach gnoo > ' > > +test_expect_success 'sanitize generated worktree name' ' > + git worktree add --detach ". weird*..?.lock.lock." && > + test -d .git/worktrees/weird-lock-lock && > + git worktree add --detach .... && > + test -d .git/worktrees/worktree > +' > + > test_done
You probably missed that this added test fails on Windows:
https://dev.azure.com/gitgitgadget/git/_build/results?buildId=3782&view=logs
The reason is that you use a "funny name" which cannot be represented on every filesystem.
Please use the FUNNYNAMES prerequisite (or introduce another one, if you are uncomfortable with using a test whether tabs are valid in filenames to indiciate whether wildcard characters are valid in filenames).
Ciao, Johannes