のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

vcpkgのdiffの作り方

PS C:\MyGitHub\vcpkg\buildtrees\harfbuzz\src\harfbuzz-1.5.1> git init .
Initialized empty Git repository in 

C:/MyGitHub/vcpkg/buildtrees/harfbuzz/src/harfbuzz-1.5.1/.git/
PS C:\MyGitHub\vcpkg\buildtrees\harfbuzz\src\harfbuzz-1.5.1> git add .
warning: LF will be replaced by CRLF in AUTHORS.
The file will have its original line endings in your working directory.
(改行のワーニングが続くので略)

PS C:\MyGitHub\vcpkg\buildtrees\harfbuzz\src\harfbuzz-1.5.1> git commit -m "temp"
[master (root-commit) a4508e8] temp
 725 files changed, 254118 insertions(+)
(略)

git diffだけやってみると

PS C:\MyGitHub\vcpkg\buildtrees\harfbuzz\src\harfbuzz-1.5.1> git diff
warning: LF will be replaced by CRLF in src/hb-ft.cc.
The file will have its original line endings in your working directory.
diff --git a/src/hb-ft.cc b/src/hb-ft.cc
index 492992e..5794d0e 100644
--- a/src/hb-ft.cc
+++ b/src/hb-ft.cc
@@ -31,6 +31,10 @@

 #include "hb-ft.h"

+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+#define generic GenericFromFreeTypeLibrary
+#endif
+
 #include "hb-font-private.hh"

 #include "hb-cache-private.hh" // Maybe use in the future?
PS C:\MyGitHub\vcpkg\buildtrees\harfbuzz\src\harfbuzz-1.5.1
> git diff | out-file -enc ascii ..\..\..\..\ports\harfbuzz\patch.diff

warning: LF will be replaced by CRLF in src/hb-ft.cc.
The file will have its original line endings in your working directory.

あとは、ファイルを適切な名前にする。

github.com