Skip to content

Commit 1ddf597

Browse files
committed
Normalize repo origin URLs before fetch
1 parent d1b9620 commit 1ddf597

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/seed-repos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ while IFS=$'\t' read -r name url branch; do
5858
fi
5959
continue
6060
fi
61+
if [ "$origin_url" != "$url" ]; then
62+
git -C "$dest" -c safe.directory="$dest" remote set-url origin "$url"
63+
origin_url="$url"
64+
fi
6165
if [ -n "${auth_header}" ] && [[ "$origin_url" == https://github.com/* ]]; then
6266
git -C "$dest" -c safe.directory="$dest" -c http.extraheader="$auth_header" fetch --all --prune
6367
else

0 commit comments

Comments
 (0)