Commit graph

4 commits

Author SHA1 Message Date
Jussi Kukkonen
b5f5957b15 gitattributes: Fix diff hunk headers
Git is really bad at identifying the correct Python function
in the diff hunk headers (this is a change in Metadata.sign()):

    @@ -384,7 +384,7 @@ class Metadata(Generic[T]):

Amazingly there is much better context detection built-in, just not
enabled. The same diff hunk headers with this commit looks like:

    @@ -384,7 +384,7 @@ def sign(

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-02-21 13:12:57 +02:00
Joshua Lock
588ba82a5e Update gitattributes for test data
The test data should not be modified, regardless of host and settings

Signed-off-by: Joshua Lock <jlock@vmware.com>
2022-07-26 17:37:55 +01:00
Martin Vrachev
69cc684230 gitattributes: make all JSON files end with LF
A really specific bug occurred on CI runs on all Windows machines
https://github.com/theupdateframework/python-tuf/runs/5467473050?check_suite_focus=true
where we weren't able to verify that what was generated is the same
as the stored on Git.

After research with Jussi, we found out that the problem comes not
from the content of the file that was generated, but because on Windows
Git proactively replaced all line endings for text files with CRLF symbol
("\r") this made the locally stored JSON files different from the one
generated.

We want to make sure such bugs doesn't occur again and that's why we
disable this behavior for all JSON files.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-03-22 16:42:00 +02:00
Teodora Sechkova
98ddbdd397
Add .gitattributes file
For compatibility with Windows systems, declare repository_data
files to always have LF line endings on checkout.

A trailing "/**" matches everything inside, with infinite depth.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-03-23 18:16:32 +02:00