Re: [PATCH v2 1/1] worktree: teach `list` to annotate locked worktree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 11, 2020 at 2:26 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> Third, this is checking only that the first character following the
> path component is a hex digit but then accepts _anything_ before
> "locked". The regex can be tightened to allow only hex digits:
>
>     grep "/locked  *[0-9a-f][0-9a-f]* locked$" out &&
>     ! grep "/unlocked  *[0-9a-f][0-9a-f]* locked$" out

Nevermind this last point. I see that there is other gunk after the
hex string but before the `locked` annotation, so this suggestion
breaks the test. The other two points -- (1) mandatory whitespace
following the path component, and (2) anchoring the pattern -- would
be welcome.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux