[dpdk-dev] [kmods PATCH] windows: normalize line-endings
Thomas Monjalon
thomas at monjalon.net
Wed Nov 11 16:02:10 CET 2020
29/10/2020 23:55, Dmitry Kozlyuk:
> MSBuild XML files have to use CRLF line-endings, otherwise any change
> results in the whole file being rewritten with CRLF line-endings by
> Visual Studio. However, it's inconvenient to have such files checked-out
> with CLRF in Unix environments.
>
> Add suggested git configuration to top-level README, so that Unix
> developers don't miss it. Remove .gitattributes, because core.autocrlf
> overrides eol= attribute. Convert line-endings of the existing files in
> the repository.
It is converted to what?
You mean all files should have LF endings in the repo?
[...]
> windows/virt2phys/virt2phys.sln | 54 ++--
> windows/virt2phys/virt2phys.vcxproj | 454 ++++++++++++++--------------
> 4 files changed, 259 insertions(+), 258 deletions(-)
The file windows/virt2phys/virt2phys.vcxproj.filters is not converted.
And I see other stuff to fix, see below.
> +Some Windows files use have to use CRLF line-endings.
"use have to use" -> "have to use" ?
Isn't it automatic to have CRLF on Windows git working tree?
> +Unix developers can configure git to get only LF on checkout:
> +
> + git config core.autocrlf input
Isn't it the default?
If all files have LF, there is nothing to do on Unix.
I think more fixes are required as below:
--- a/windows/netuio/netuio.sln
+++ b/windows/netuio/netuio.sln
@@ -1,4 +1,3 @@
-
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
diff --git a/windows/netuio/netuio.vcxproj b/windows/netuio/netuio.vcxproj
index 87c8b94..f01bf2a 100644
--- a/windows/netuio/netuio.vcxproj
+++ b/windows/netuio/netuio.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
@@ -110,4 +110,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/windows/netuio/netuio.vcxproj.filters b/windows/netuio/netuio.vcxproj.filters
index 49c1da1..43536ce 100644
--- a/windows/netuio/netuio.vcxproj.filters
+++ b/windows/netuio/netuio.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
@@ -51,4 +51,4 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/windows/virt2phys/virt2phys.sln b/windows/virt2phys/virt2phys.sln
index ea4eec4..02dc38d 100644
--- a/windows/virt2phys/virt2phys.sln
+++ b/windows/virt2phys/virt2phys.sln
@@ -1,4 +1,3 @@
-
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
diff --git a/windows/virt2phys/virt2phys.vcxproj b/windows/virt2phys/virt2phys.vcxproj
index 69af150..c86cc9b 100644
--- a/windows/virt2phys/virt2phys.vcxproj
+++ b/windows/virt2phys/virt2phys.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -225,4 +225,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
More information about the dev
mailing list