From: Karthik Nayak Date: Wed, 24 Sep 2025 11:06:49 GMT Subject: Re: [PATCH v3 3/8] reftable: check for trailing newline in 'tables.list' Message-ID: In-Reply-To: "Kristoffer Haugsbakk" writes: > On Thu, Sep 18, 2025, at 10:11, Karthik Nayak wrote: >> In the reftable format, the 'tables.list' file contains a newline >> separated list of tables. While we parse this file, we do not check or >> care about trailing newlines. Tighten the parser in `parse_names()` to >> return an appropriate error if there is no trailing newline. > > Nit:[1] newline-separated + requiring a trailing newline sounds like it > really equals: newline-terminated list. Is this moving from > effectively using newline-separated to a newline-terminated format? > > † 1: Since others have commented anyway > I see the confusion, it is a newline-separated list, but we don't check/care for the last newline. We don't require a separate terminating newline. Let me amend the commit message to make this clearer. >> >> This requires modification to `parse_names()` to accept a third argument >> which will hold the error value. >> >> Signed-off-by: Karthik Nayak >> ---