Merge pull request #18266 from owen-mc/misc/prepare-db-upgrade-improvement

Misc: Look up remote name instead of using `origin` in `misc/prepare-db-upgrade.sh`
This commit is contained in:
Owen Mansel-Chan
2024-12-13 21:42:18 +00:00
committed by GitHub

View File

@@ -30,7 +30,10 @@ EOF
exit "${exit_code}"
}
prev_hash="origin/main"
# default for prev_hash: the main branch of the remote for 'github/codeql'.
# This works out as a dynamic lookup of the hash of the file in the main branch
# of the repo.
prev_hash=$(git remote -v | grep 'github/codeql\.git (fetch)$' | cut -f1)/main
while [ $# -gt 0 ]; do
case "$1" in