On Mon, Oct 19, 2020 at 08:15:56AM +0200, Peter Eisentraut wrote:
> On 2020-10-12 13:36, Michael Paquier wrote:
> > On Mon, Oct 12, 2020 at 03:39:51PM +0900, Masahiko Sawada wrote:
> > > Yes, this patch resolves the problem.
> > 
> > Okay, applied then.
> 
> Could you adjust the generation script so that the resulting header file
> passes the git whitespace check?  Check the output of
> 
> git show --check 80f8eb79e24d9b7963eaf17ce846667e2c6b6e6f

Hmm.  Giving up on the left space padding would make the table harder
to read because the elements would not be aligned anymore across
multiple lines, and I'd rather keep 8 elements per lines as we do now.
This is generated by this part in PerfectHash.pm, where we apply a
at most 7 spaces of padding to all the members, except the first one
of a line that uses 6 spaces at most with two tabs:
        for (my $i = 0; $i < $nhash; $i++)
        {
                $f .= sprintf "%s%6d,%s",
                  ($i % 8 == 0 ? "\t\t" : " "),
                  $hashtab[$i],
                  ($i % 8 == 7 ? "\n" : "");
        }
Could we consider this stuff as a special case in .gitattributes
instead?
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to