Skip to content

Commit 906c517

Browse files
authored
Merge pull request github#18266 from owen-mc/misc/prepare-db-upgrade-improvement
Misc: Look up remote name instead of using `origin` in `misc/prepare-db-upgrade.sh`
2 parents 9948f6e + 8d5759d commit 906c517

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

misc/scripts/prepare-db-upgrade.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ EOF
3030
exit "${exit_code}"
3131
}
3232

33-
prev_hash="origin/main"
33+
# default for prev_hash: the main branch of the remote for 'github/codeql'.
34+
# This works out as a dynamic lookup of the hash of the file in the main branch
35+
# of the repo.
36+
prev_hash=$(git remote -v | grep 'github/codeql\.git (fetch)$' | cut -f1)/main
3437

3538
while [ $# -gt 0 ]; do
3639
case "$1" in

0 commit comments

Comments
 (0)