Skip to content

Commit ec5d655

Browse files
committed
Look up remote name instead of using origin
1 parent f097168 commit ec5d655

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/semmle-code'.
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/semmle-code\.git (fetch)$' | cut -f1)/main
3437

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

0 commit comments

Comments
 (0)