From 46c272f9b430fe46dc86caa631a3fb1b0e0f544c Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Wed, 10 Jun 2020 12:08:14 -0700 Subject: [PATCH] sync: don't check and warn about non-empty merges anymore Initial versions of sync script couldn't handle non-empty merges. But since then, script became smarter, more interactive and thus more powerful and can handle some complicated situations easily on its own, while falling back to human intervention for even more complicated situations. This non-empty merge check has outlived its purpose and is just an annoying bump in sync process. Drop it. Signed-off-by: Andrii Nakryiko --- scripts/sync-kernel.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/scripts/sync-kernel.sh b/scripts/sync-kernel.sh index 88bebb0..deccd06 100755 --- a/scripts/sync-kernel.sh +++ b/scripts/sync-kernel.sh @@ -85,36 +85,6 @@ commit_signature() git show --pretty='("%s")|%aI|%b' --shortstat $1 -- ${2-.} | tr '\n' '|' } -# Validate there are no non-empty merges (we can't handle them) -# $1 - baseline tag -# $2 - tip tag -validate_merges() -{ - local baseline_tag=$1 - local tip_tag=$2 - local new_merges - local merge_change_cnt - local ignore_merge_resolutions - local desc - - new_merges=$(git rev-list --merges --topo-order --reverse ${baseline_tag}..${tip_tag} ${LIBBPF_PATHS[@]}) - for new_merge in ${new_merges}; do - desc=$(commit_desc ${new_merge}) - echo "MERGE: ${desc}" - merge_change_cnt=$(git show --format='' ${new_merge} | wc -l) - if ((${merge_change_cnt} > 0)); then - read -p "Merge '${desc}' is non-empty, which will cause conflicts! Do you want to proceed? [y/N]: " ignore_merge_resolutions - case "${ignore_merge_resolutions}" in - "y" | "Y") - echo "Skipping '${desc}'..." - continue - ;; - esac - exit 3 - fi - done -} - # Cherry-pick commits touching libbpf-related files # $1 - baseline_tag # $2 - tip_tag @@ -243,10 +213,6 @@ git branch ${BPF_TIP_TAG} ${BPF_TIP_COMMIT} git branch ${SQUASH_BASE_TAG} ${SQUASH_COMMIT} git checkout -b ${SQUASH_TIP_TAG} ${SQUASH_COMMIT} -# Validate there are no non-empty merges in bpf-next and bpf trees -validate_merges ${BASELINE_TAG} ${TIP_TAG} -validate_merges ${BPF_BASELINE_TAG} ${BPF_TIP_TAG} - # Cherry-pick new commits onto squashed baseline commit cherry_pick_commits ${BASELINE_TAG} ${TIP_TAG} cherry_pick_commits ${BPF_BASELINE_TAG} ${BPF_TIP_TAG}