"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Indentation in contributed code
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 8 Dec 2020 23:59:08 +0100

Download raw body.

Thread
On Tue, Dec 08, 2020 at 11:21:50PM +0100, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > Indentation uses tabs for regular lines and 4 spaces for lines
> > that continue a statement.
> 
> Neels's diff code also uses a different indentation style for
> continuation lines.  I don't know what the plan is there, so I
> haven't touched any of it, but this feels like an opportunity to
> bring it up...

Indeed, the new diff code does not look 100% like OpenBSD base code.
In the long term we may want to tidy this up.

There are several things in the diff code that might not get accepted
into OpenBSD base, such as prominent use of bool from stdbool.h (which
is strictly internal to the diff implementation, I made sure of that).

Neels voluntered to run the diff project when I asked him if he wanted to
attend the u2k20 hackathon with us. The pitch was that this would be a
portable diff implementation under ISC licence. Got is not its only target.
We'd be happy to see this code being consumed elsewhere. That's also why
it is hosted in a separate repository.

Neels wrote the initial implementation in his own style. Because this
was a large effort I didn't want to add to the workload by requesting
a lot of style changes early on.
Eventually, we made some adjustments, such as wrapping long lines to
80 columns, declaring variables only at the top of a scope, etc.

I expect to be making more stylistic change over time. At this point,
finding and fixing bugs in the diff code is still more important to me.