From: Jeff King Date: Thu, 21 Feb 2019 13:23:06 GMT Subject: Re: [PATCH] worktree add: sanitize worktree names Message-ID: <20190221132306.GD20536@sigill.intra.peff.net> In-Reply-To: On Thu, Feb 21, 2019 at 06:52:05PM +0700, Duy Nguyen wrote: > > the postfix internally, but why can't it be okay with "name.lock.lock") > > Uh oh I miss this case. I only delete ".lock" once, "name.lock" would > still be rejected. Thanks for noticing. Another tricky case is "refs/heads/foo.lock/bar.lock", which would need both ".lock"s removed. I think your v2 handles this correctly, though (because it disallows "." entirely). -Peff