Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 03:45:55AM +, brian m. carlson wrote: > > > I will point out that with the SHA-256 work, reading the config file > > > becomes essential for SHA-256 repositories, because we need to know the > > > object format. Removing the config file leads to things blowing up in a >

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-19 Thread brian m. carlson
On Wed, Dec 19, 2018 at 09:52:12PM -0500, Jeff King wrote: > On Thu, Dec 20, 2018 at 12:17:53AM +, brian m. carlson wrote: > > > On Wed, Dec 19, 2018 at 10:27:35AM -0500, Jeff King wrote: > > > I dunno. This is one of those dark corners of the code where we appear > > > to do the wrong thing,

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-19 Thread Jeff King
On Thu, Dec 20, 2018 at 12:17:53AM +, brian m. carlson wrote: > On Wed, Dec 19, 2018 at 10:27:35AM -0500, Jeff King wrote: > > I dunno. This is one of those dark corners of the code where we appear > > to do the wrong thing, but nobody seems to have noticed or cared much, > > and changing it r

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-19 Thread brian m. carlson
On Wed, Dec 19, 2018 at 10:27:35AM -0500, Jeff King wrote: > I dunno. This is one of those dark corners of the code where we appear > to do the wrong thing, but nobody seems to have noticed or cared much, > and changing it runs the risk of breaking some obscure cases. I'm not > sure if we should bi

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-19 Thread Martin Ågren
On Wed, 19 Dec 2018 at 16:27, Jeff King wrote: > > On Tue, Dec 18, 2018 at 08:25:26AM +0100, Martin Ågren wrote: > > > No-one looks at the return value, so we might as well drop it. It's > > still available as `format->version`. > > Hmm. If we have to pick one, I'd say that just returning a sane e

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-19 Thread Jeff King
On Tue, Dec 18, 2018 at 08:25:26AM +0100, Martin Ågren wrote: > No-one looks at the return value, so we might as well drop it. It's > still available as `format->version`. > > In v1 of what became commit 2cc7c2c737 ("setup: refactor repo format > reading and verification", 2016-03-11), this funct

[PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-17 Thread Martin Ågren
No-one looks at the return value, so we might as well drop it. It's still available as `format->version`. In v1 of what became commit 2cc7c2c737 ("setup: refactor repo format reading and verification", 2016-03-11), this function actually had return type "void", but that was changed in v2. Almost t