mirror of https://github.com/microsoft/vcpkg.git
Try --unshallow if fetch-depth: 50 is insufficient (#52255)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
39688db755
commit
fe7c83bd1d
|
|
@ -33,7 +33,15 @@ jobs:
|
|||
synthetic_merge_commit=$(git rev-parse HEAD)
|
||||
target_branch_commit=$(git rev-parse HEAD^1)
|
||||
incoming_branch_commit=$(git rev-parse HEAD^2)
|
||||
merge_base=$(git merge-base "$target_branch_commit" "$incoming_branch_commit")
|
||||
merge_base=$(git merge-base "$target_branch_commit" "$incoming_branch_commit" || true)
|
||||
if [ -z "$merge_base" ]; then
|
||||
# The two tips can exist in a shallow repository without enough
|
||||
# ancestry to discover their merge-base.
|
||||
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
|
||||
git fetch --no-tags --unshallow origin
|
||||
fi
|
||||
merge_base=$(git merge-base "$target_branch_commit" "$incoming_branch_commit")
|
||||
fi
|
||||
|
||||
git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*portfile.cmake' | sed 's/[MAR]\t*//' > .github-pr.changed-portfiles
|
||||
if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_apply_patches|vcpkg_build_msbuild|vcpkg_extract_source_archive_ex)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-function; else touch .github-pr.deprecated-function; fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue