PSA: Mark SVG as binary

Ben Cooksley bcooksley at kde.org
Fri Mar 3 21:49:06 GMT 2023


Hi all,

Over the past few months Sysadmin has periodically received reports of our
Git hooks failing when processing commits in certain circumstances.

Looking at all of these instances a clear trend has emerged, with files
that have lines in them that are extremely and excessively long being the
culprit of this issue. In all instances, the files in question have been
generated by software and not been written by humans.

While it is not entirely clear why this issue has suddenly appeared (as the
code within the Git hooks causing the failure has been in production for
10+ years) I am suspecting a change in behaviour in either Git or Python to
be the cause of this (with Git being most likely).

In all cases i'm aware of, the files have been in either SVG, JSON or XML
in format.

To fix this, and allow changes to be merged please add a ".gitattributes"
file at the top level of the Git repository you are seeing this behaviour
in on the master branch with the following contents:

*.svg binary

Amending as needed to cover other files that also contain content that has
a meaningless diff.

Note that the file *must* be placed at the root of the repository and on
the master branch, otherwise it will not be propagated by GitLab to our
hooks.

Thanks,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20230304/398af9ee/attachment.htm>


More information about the kde-devel mailing list