Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions scripts/scan-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,21 @@ while IFS='|' read -r repo name category; do

# Clone (skip if already present)
if [[ -d "$clone_dir/.git" ]]; then
echo " clone already present, skipping git clone"
# A previous run may have failed mid-checkout (e.g. Windows long-path
# errors), leaving .git but an incomplete working tree. Detect missing
# tracked files and re-checkout before scanning.
if ! git -C "$clone_dir" diff --quiet HEAD -- 2>/dev/null; then
echo " previous checkout incomplete, restoring working tree..."
git -C "$clone_dir" -c core.longpaths=true checkout -- . 2>&1 | \
sed 's/^/ /'
else
echo " clone already present, skipping git clone"
fi
else
echo " cloning $repo ..."
git clone --depth 1 --filter=blob:none \
# core.longpaths=true is required on Windows for repos with paths >260
# chars (e.g. Keycloak); harmless on Linux/macOS.
git -c core.longpaths=true clone --depth 1 --filter=blob:none \
"https://github.com/$repo.git" "$clone_dir" 2>&1 | \
sed 's/^/ /'
fi
Expand Down
Loading