sigstore / root-signing

TUF repository for Sigstore trust root
Apache License 2.0
80 stars 77 forks source link

Tweak git attributes to fix default diff behaviour #1162

Closed joshuagl closed 3 months ago

joshuagl commented 3 months ago

PR #588 introduced a change to the gitattributes to prevent autocrlf from changing line endings of files which are digested or size checked (see issue

Telling git to treat all files in the TUF repository as binaries makes the default behaviour of git diff less useful. While it can be fixed by passing --text, we can instead modify our gitattributes to treat files in the TUF repository as LF line-endings only. This change will ensure files are committed with LF line endings and do not have the line-endings converted on checkout from the index.

joshuagl commented 3 months ago

is the format here correct? I remember seeing text eol=lf before

Good catch! I had misread the gitattributes docs and it seemed to work locally (testing git diff output).