Skip to content

Add .gitattributes file #1321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2021
Merged

Conversation

sechkova
Copy link
Contributor

Description of the changes being introduced by the pull request:

For compatibility with Windows systems, declare repository_data files to always have LF line endings on checkout.

The pattern tests/repository_data/** matches everything inside the directory tests/repository_data relative to the .gitattributes file, with infinite depth.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@sechkova sechkova changed the title Add .gitattribites file Add .gitattributes file Mar 23, 2021
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>
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @sechkova! Great to have this fixed for folks running the tests on Windows.
NOTE: anyone running on windows with an existing checkout will need to run git reset to ensure the EOL sequence is updated for files that have already been created:

git reset --hard

I tested this by:

  • cloning the tuf repo on Windows, seeing the EOL sequence of tests/repository_data/repository/metadata/root.json is CRLF
  • cloning your tuf fork (and gitattr branch) on Windows, seeing the EOL sequence of tests/repository_data/repository/metadata/root.json is LF

@joshuagl joshuagl merged commit 1d23479 into theupdateframework:develop Mar 25, 2021
@sechkova sechkova deleted the gitattr branch March 25, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants