I need to modify sources under Git version control. The sources are Visual Studio project files, which makes them native Microsoft. I want to avoid whitespace issues, including line ending games.
I looked at the files before the modification under emacs, and the ^M was clearly not present.
I then executed the following from a script from a Linux machine:
sed -i 's/odbc32.lib //g' *.vcproj
sed -i 's/odbccp32.lib //g' *.vcproj
When I look at the changes:
$ git diff cryptest.vcproj
diff --git a/cryptest.vcproj b/cryptest.vcproj
index cec447d..9ae71ea 100644
--- a/cryptest.vcproj
+++ b/cryptest.vcproj
@@ -76,7 +76,7 @@
...
Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib"
+ AdditionalDependencies="Ws2_32.lib"^M
SuppressStartupBanner="true"
...
How do I perform a replacement without adding extraneous whitespace?