Skip to content

Detect .ply as binaryΒ #6973

@Walther

Description

@Walther

PLY (file format)

PLY is a computer file format known as the Polygon File Format or the Stanford Triangle Format. It was principally designed to store three-dimensional data from 3D scanners. The data storage format supports a relatively simple description of a single object as a list of nominally flat polygons. A variety of properties can be stored, including color and transparency, surface normals, texture coordinates and data confidence values. The format permits one to have different properties for the front and back of a polygon.

There are two versions of the file format, one in ASCII, the other in binary.

Currently, there are over 50 thousand .ply files found on the GitHub code search. These are treated as code, and show up in statistics for lines added, pull request change sizes, and so on.

Even though the files can technically be ASCII, they are almost universally generated by 3D modeling programs as output, used by 3D rendering programs as input, and easily go up to millions of lines in length.

Unfortunately, even the various workarounds proposed in the documentation and other relevant issues do not help. The following attempted settings in .gitattributes have no effect.

# attempt 1
*.ply binary
# attempt 2
*.ply binary
ply/** linguist-vendored
# attempt 3
ply/**/*.ply binary linguist-generated
# attempt 4
ply/**/*.ply -diff -merge -text linguist-generated

A pull request with some test models added shows up as 3 million lines of code added, potentially ruining any statistics and insights over time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions