From 44426d93113d593108612455cf105d0ca7ad14b6 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Fri, 12 Apr 2024 15:29:35 -0400 Subject: [PATCH] .gitattributes: Prevent line ending conversion Unsets the text attribute on all files to prevent their line endings from being normalized. See https://git-scm.com/docs/gitattributes for background. This was previously accomplished solely by instructing users to set core.autocrlf to false. However, that does not translate to pipelines and setting in a pipeline requires the system level git configuration to be modified prior to checkout. Git configs cannot be checked into to a repo and automatically used for security reasons. This is a simple way to check the change into the repo so it applies for all users including pipelines to prevent line ending conversion. This allows plugins like LineEndingCheck to produce similar results in pipelines on Linux and Windows agents. --- This commit is testing the change for a period of time in the mu_basecore repo. If no issues with git operations and impact on tools is discovered after a couple weeks, it will be synced across all repos from mu_devops. Signed-off-by: Michael Kubacki --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..625449502b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* -text