Fix cherrypick URL parsing with colon
This commit is contained in:
@@ -573,7 +573,7 @@ from_source() {
|
|||||||
|
|
||||||
# Add cherrypicks
|
# Add cherrypicks
|
||||||
for entry in ${P_ARR[cherrypicks]}; do
|
for entry in ${P_ARR[cherrypicks]}; do
|
||||||
url_branch="${entry%%:*}"
|
url_branch="${entry%:*}"
|
||||||
commit="${entry##*:}"
|
commit="${entry##*:}"
|
||||||
|
|
||||||
branch=""
|
branch=""
|
||||||
@@ -599,6 +599,13 @@ from_source() {
|
|||||||
else
|
else
|
||||||
execute git -C "$BUILD_DIR" fetch "$remote"
|
execute git -C "$BUILD_DIR" fetch "$remote"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Verify commit exists before attempting cherry-pick
|
||||||
|
if ! git -C "$BUILD_DIR" cat-file -e "$commit^{commit}" 2>/dev/null; then
|
||||||
|
debug "Commit $commit not found after fetching from $remote; skipping"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
execute git -C "$BUILD_DIR" merge-base --is-ancestor "$commit" HEAD ||
|
execute git -C "$BUILD_DIR" merge-base --is-ancestor "$commit" HEAD ||
|
||||||
execute git -C "$BUILD_DIR" cherry-pick "$commit"
|
execute git -C "$BUILD_DIR" cherry-pick "$commit"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user