Skip to content

Consider JavaScript files as binary in .gitattributes #20406

@wenz

Description

@wenz

Is your feature request related to a problem? Please describe.

Very often in this repository, the jQuery JavaScript library is referenced in HTML files with SRI (Subresource Integrity), meaning that a hash of the file is provided as an attribute. Therefore it is crucial that JavaScript files are not modified when pushed to the repository. Git settings like core.autocrlf (defaults to true under Git tools for Windows) can therefore cause issues that are not immediately noted. The more SRI we use, the more often this problem might occur.

Describe the solution you'd like

If *.js files would be considered as binary in ´.gitattributes´, they should not be altered when being pushed to the repository.

Additional context

Suggested fix: add *.js binary in .gitattributes

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions