mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-05 08:09: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
|
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 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..."
|
read -p "Applying ${TMP_DIR}/patches/${patch} failed, please resolve manually and press <return> to proceed..."
|
||||||
fi
|
fi
|
||||||
git am --continue
|
git am --continue
|
||||||
|
|||||||
Reference in New Issue
Block a user