From: Junio C Hamano Date: Thu, 21 Jan 2021 03:18:33 GMT Subject: Re: [PATCH v3 5/7] worktree: teach `list --porcelain` to annotate locked worktree Message-ID: In-Reply-To: Phillip Wood writes: > l.starts_with("locked ") > rather than having to do > l.starts_with("locked ") || l == "locked\n" l.regexp_matches("^locked[\s\n]")? Jokes aside, isn't the "space separated list" meant to be used more like: attrs = l.splitAtEach(" ") if "locked" in attrs: ... yeah it is locked ... if "broken" in attrs: ... ouch, it is broken ... so I am not sure if having always a trailing whitespace is a good idea to begin with (the last element may become an empty string if the splitting is done naively).