Fetch (just) enough refs in script/cherry-pick (#41949)

Before this change we'd download all the tagged commits, but none of
their ancestors,
this was slow and made cherry-picking fail.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-11-04 17:09:43 -07:00
committed by GitHub
parent b587a62ac3
commit f9fb855990

View File

@@ -12,9 +12,8 @@ CHANNEL="$3"
SHORT_SHA="${COMMIT_SHA:0:8}"
NEW_BRANCH="cherry-pick-${BRANCH_NAME}-${SHORT_SHA}"
git fetch origin
git checkout "$BRANCH_NAME"
git checkout -B "$NEW_BRANCH"
git fetch --depth 2 origin +${COMMIT_SHA} ${BRANCH_NAME}
git checkout --force "origin/$BRANCH_NAME" -B "$NEW_BRANCH"
git cherry-pick "$COMMIT_SHA"