Re: [PATCH v6 0/5] Reftable support git-core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Han-Wen Nienhuys <hanwenn@xxxxxxxxx> writes:

> On Wed, Feb 19, 2020 at 6:02 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
>> > your checker is tripping over code imported from zlib. I added a /*
>> > clang-format off */ comment to avoid reformatting this code. What do
>> > you suggest?
>>
>> Use zlib from the system instead?
>
> uncompress2 is a 2016 addition to zlib. It doesn't pass on
> gitgitgadget's CI, because it is using an older version of zlib.

Ahh.

It is OK (and indeed you're right that you cannot avoid it) to ship
a reasonably new snapshot as a fallback in such a case, but it still
is far more preferrable to avoid linking with the fallback snapshot
copy when a working one is available on the system, especially for a
widely used and established library like zlib, because we have one
less thing to keep up-to-date with the security patches made to the
upstream.

In any case, if we cannot avoid shipping a borrowed code that we'd
rather not touch or fix-up, covering them with local .gitattributes
file, disabling selected whitespace checks, may be one way out.
IIUC, our default settings for the whitespace check is in the
top-level .gitattributes file

    * whitespace=!indent,trail,space
    *.[ch] whitespace=indent,trail,space diff=cpp
    *.sh whitespace=indent,trail,space eol=lf

A new local .gitattrubutes file in retable/ directory to loosen the
set of checks.  The borrowed code triggers indent-with-non-tab and
trailing-space at least, which needs to be disabled locally, I
think.

Thanks.

 reftable/.gitattributes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/reftable/.gitattributes b/reftable/.gitattributes
new file mode 100644
index 0000000000..f44451a379
--- /dev/null
+++ b/reftable/.gitattributes
@@ -0,0 +1 @@
+/zlib-compat.c	whitespace=-indent-with-non-tab,-trailing-space



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux