mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 00:39:07 +08:00
sync: improve patch application process by using patch command
git apply -3 doesn't always leave conflicted files in the working directory. Use patch --merge instead, it seems to work better in more complicated situations. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
@@ -264,7 +264,7 @@ git checkout -b ${LIBBPF_SYNC_TAG}
|
||||
|
||||
for patch in $(ls -1 ${TMP_DIR}/patches | tail -n +2); do
|
||||
if ! git am -3 --committer-date-is-author-date "${TMP_DIR}/patches/${patch}"; then
|
||||
if ! git apply -3 "${TMP_DIR}/patches/${patch}"; then
|
||||
if ! patch -p1 --merge < "${TMP_DIR}/patches/${patch}"; then
|
||||
read -p "Applying ${TMP_DIR}/patches/${patch} failed, please resolve manually and press <return> to proceed..."
|
||||
fi
|
||||
git am --continue
|
||||
|
||||
Reference in New Issue
Block a user