Look up remote name instead of using origin

This commit is contained in:
Owen Mansel-Chan
2024-12-11 11:02:45 +00:00
parent f0971684e3
commit ec5d655d7f

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/semmle-code'.
# 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/semmle-code\.git (fetch)$' | cut -f1)/main
while [ $# -gt 0 ]; do
case "$1" in