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
This commit is contained in:
atalman
2024-08-20 21:48:04 +00:00
committed by PyTorch MergeBot
parent 2e1830c7c8
commit a36739f36a

View File

@ -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