+
+
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..7f786ef
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7195b92
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..5ace414
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/gitingest/utils/git_utils.py b/src/gitingest/utils/git_utils.py
index 70b4cf4..1fd24e0 100644
--- a/src/gitingest/utils/git_utils.py
+++ b/src/gitingest/utils/git_utils.py
@@ -6,6 +6,7 @@ import asyncio
import base64
import re
from typing import Final
+import sys
from urllib.parse import urlparse
import httpx
@@ -74,10 +75,13 @@ async def run_command(*args: str) -> tuple[bytes, bytes]:
async def ensure_git_installed() -> None:
"""Ensure Git is installed and accessible on the system.
+ On Windows, this also enables support for long file paths via
+ `git config --system core.longpaths true`.
+
Raises
------
RuntimeError
- If Git is not installed or not accessible.
+ If Git is not installed or not accessible, or if enabling long paths fails.
"""
try:
@@ -85,6 +89,12 @@ async def ensure_git_installed() -> None:
except RuntimeError as exc:
msg = "Git is not installed or not accessible. Please install Git first."
raise RuntimeError(msg) from exc
+ if sys.platform == "win32":
+ try:
+ await run_command("git", "config", "--system", "core.longpaths", "true")
+ except RuntimeError as exc:
+ msg = "Failed to enable long paths. You may need to run the app as Administrator."
+ raise RuntimeError(msg) from exc
async def check_repo_exists(url: str, token: str | None = None) -> bool: