Re: [PATCH] worktree add: sanitize worktree names
- From
Jeff King <peff@peff.net>
- Date
- Feb 21, 2019, 13:23 UTC
- Message-ID
- <20190221132306.GD20536@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8CWH-b18uaRvn-bXdsRbn+6QnJ6GNekqG2khGeJUa8S3w@mail.gmail.com>
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