Skip to content

Commit 3c31b1e

Browse files
authored
[CMake] Preserve non-PATCH brackets in title using git am --keep-non-patch (#593)
Also fix a typo.
1 parent dfd5996 commit 3c31b1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/CMakeFunctions.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ function(apply_patches repo_dir patches_dir base_revision target_branch)
134134
message(STATUS "[OPENCL-CLANG] Patch ${patch} is already in local branch - ignore patching")
135135
else()
136136
execute_process( # Apply the patch
137-
COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patch}
137+
COMMAND ${GIT_EXECUTABLE} am --3way --keep-non-patch --ignore-whitespace ${patch}
138138
WORKING_DIRECTORY ${repo_dir}
139139
OUTPUT_VARIABLE patching_log
140140
)
141141
message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
142142
endif()
143143
endforeach(patch)
144-
elsef(patches_needed EQUAL 0) # The target branch already exists
144+
elseif(patches_needed EQUAL 0) # The target branch already exists
145145
execute_process( # Check it out
146146
COMMAND ${GIT_EXECUTABLE} checkout ${target_branch}
147147
WORKING_DIRECTORY ${repo_dir}

0 commit comments

Comments
 (0)