From a9af753a2e6744b621604bc9060076d28ce3bf7b Mon Sep 17 00:00:00 2001 From: Sheldon Finlay Date: Fri, 27 Mar 2026 15:47:43 -0400 Subject: [PATCH] fix: setup.sh initializes git repo if none exists --- setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.sh b/setup.sh index d010b44..881ff17 100755 --- a/setup.sh +++ b/setup.sh @@ -45,6 +45,13 @@ fi echo "[setup] Harness source: $HARNESS_SRC" +# --- Ensure git repo exists --- +if ! git rev-parse --git-dir &>/dev/null; then + echo "[setup] No git repo found. Initializing..." + git init + git checkout -b main 2>/dev/null || true +fi + # --- Scaffold .loop/ --- PROJECT_ROOT="$(pwd)" LOOP_DIR="$PROJECT_ROOT/.loop"