junxnone / xwiki

https://junxnone.github.io/xwiki/
0 stars 0 forks source link

Tools Git Patch #226

Open junxnone opened 1 year ago

junxnone commented 1 year ago

Git Patch

生成 patch

format-patch

生成最后一个 commit 的 patch

git format-patch -1

生成最后 N 个 patch

git format-patch -N 

生成 commitID 之后的 patch

git format-patch commitID

生成 两个 commit 之间的 patch

git format-patch commitID1 commitID2

git diff

git diff > your_patch_name.patch

使用 patch

apply

git apply  your_patch_name.patch

am

git am   your_patch_name.patch

Patch 描述

From 2fd011b6ff5b96a1b6bf2c449dfa0d26fce59103 Mon Sep 17 00:00:00 2001
From: Giorgos Karagounis <giorgos.karagounis@oqton.com>
Date: Mon, 18 Mar 2024 16:37:26 +0100
Subject: [PATCH] Fix for jpegturbo Windows build

---
 3rdparty/libjpeg-turbo/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/3rdparty/libjpeg-turbo/CMakeLists.txt b/3rdparty/libjpeg-turbo/CMakeLists.txt
index ac0aaf63e1..6e508c8860 100644
--- a/3rdparty/libjpeg-turbo/CMakeLists.txt
+++ b/3rdparty/libjpeg-turbo/CMakeLists.txt
@@ -16,7 +16,7 @@ endif()
 message(STATUS "libjpeg-turbo: VERSION = ${VERSION}, BUILD = ${BUILD}")

 math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8")
-string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC)
+string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LC)

 if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64" OR
   CMAKE_SYSTEM_PROCESSOR_LC MATCHES "amd64" OR
--
2.34.1