From a36739f36a3a628382d97e0a53dc915f33dba3b8 Mon Sep 17 00:00:00 2001 From: atalman Date: Tue, 20 Aug 2024 21:48:04 +0000 Subject: [PATCH] Cherry-Picking don't resolve conflicts (#134047) During cherry-picking we want to use default setting and fail if there is merge conflict Here an example of invalid conflict resolution: https://github.com/pytorch/pytorch/pull/131194 and cherry-pick https://github.com/pytorch/pytorch/pull/133590 Pull Request resolved: https://github.com/pytorch/pytorch/pull/134047 Approved by: https://github.com/kit1980 --- .github/scripts/cherry_pick.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/cherry_pick.py b/.github/scripts/cherry_pick.py index 9587c9a46d1..2fecf0bcb63 100755 --- a/.github/scripts/cherry_pick.py +++ b/.github/scripts/cherry_pick.py @@ -169,7 +169,8 @@ def create_cherry_pick_branch( repo.create_branch_and_checkout(branch=cherry_pick_branch) # We might want to support ghstack later - repo._run_git("cherry-pick", "-x", "-X", "theirs", commit_sha) + # We don't want to resolve conflicts here. + repo._run_git("cherry-pick", "-x", commit_sha) repo.push(branch=cherry_pick_branch, dry_run=False) return cherry_pick_branch