[Bug] Windows: Git 2.48.1 被判定为低于 2.31,提示 "Git 2.31 or newer is required",仓库无法读取
Los mantenedores suelen responder en 1 día
@AACS111 ya está trabajando en esto.
Desde el 29/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start with rust/lithe-core/src/git/execution_policy.rs and inspect validate_version; then trace how lithe_git_host::configuration::version() obtains and caches Git's version on Windows. The report suspects empty probe output but has not verified the cause, so first reproduce with the provided Git 2.48.1 setup and inspect the probe result. Done means Git is recognized and the error distinguishes an empty or unparseable probe from an outdated version.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Platform / 平台
Windows
Area / 模块
Git
Lithe version / Lithe 版本
0.6.5
Priority / 优先级
P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用
OS and architecture / 操作系统与架构
Windows 11 10.0.26200, AMD64
Environment / 环境信息
Git for Windows 2.48.1.windows.1(安装在 D:\Program Files\Git,非 C 盘)
命令行 git --version 正常:git version 2.48.1.windows.1
Steps to reproduce / 复现步骤
- 用 Lithe 打开含 Git 仓库的项目
- 提交面板提示“Git 无法读取此仓库”
- 设置 → 版本控制 → Git:把“Git 可执行文件”分别设为 bin\git.exe、cmd\git.exe;配置来源试过“当前仓库”和“全局 Git 配置”;保存、点“重新读取 Git 配置”、完全重启 IDE
- 报错不变
Expected behavior / 预期行为
识别到 Git 2.48.1,仓库正常读取。
Actual behavior / 实际行为
Git 2.31 or newer is required; select a newer executable in Git settings
命令行 git --version、git status 均正常(cmd\git.exe、mingw64\bin\git.exe、bin\git.exe 三个都输出 2.48.1)。
日志 %LOCALAPPDATA%\app.lithe.windows\logs\git\ 中全是 error_code=invalid_request,duration_ms 多为 0~1,没有具体原因。
初步分析(读源码所得,未能编译验证):报错来自 rust/lithe-core/src/git/execution_policy.rs 的 validate_version。解析逻辑本身没问题(带 .windows.1 后缀有单测覆盖),推测 lithe_git_host::configuration::version() 取到了空输出,被报成“版本过低”。该函数会缓存探测结果,空串也会被缓存;子进程以 CREATE_SUSPENDED + Job Object、stdin=NUL 启动,可能与本机磁盘加密驱动相互影响。建议:探测输出为空或无法解析时,错误信息带上原始输出和 exit code,并与“版本过低”区分;不缓存空结果。
Logs or diagnostic output / 日志或诊断输出
[scope=git.executionInspect] operation finished category=git error_code=invalid_request duration_ms=0
[scope=git.repositorySetup] operation finished category=git error_code=invalid_request duration_ms=1
Screenshots or recordings / 截图或录屏
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 151
- Merge medio
- 11 h 58 min
- PR fusionados (30 d)
- 357
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 1lck/Lithe-IDEA
-
area:editor bug P0 platform:macos review: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
1lck/Lithe-IDEA#1118 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug] 修复统一生命周期管理里面的显示逻辑Posiblemente ocupada @xiaoyumuxi la tomó hoy. Abiertoarea:other bug issue-form:bug P0 platform:macos review: high
1lck/Lithe-IDEA#1627 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature] LSP 显示逻辑优化Posiblemente ocupada @xiaoyumuxi la tomó hoy. Abiertoarea:editor enhancement issue-form:feature P2 platform:macos review: high
1lck/Lithe-IDEA#1626 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug] 搜索框逻辑优化Abiertoarea:editor bug issue-form:bug P1 platform:macos review: high
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
1lck/Lithe-IDEA#1624 ·
Los mantenedores suelen responder en 1 día
-
[Bug] MD 预览不应该自动对<p></p>进行换行处理Abiertoarea:editor bug issue-form:bug P0 platform:macos review: high
Dificultad 3/5 Medio día Aptitud para principiantes 35/100
1lck/Lithe-IDEA#1623 ·
Los mantenedores suelen responder en 1 día
Todos los issues de 1lck/Lithe-IDEA
Issues similares
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthAbiertoenhancement tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
danielmiessler/LifeOS#2533 ·
Los mantenedores suelen responder en 9 días
-
auto:producer auto:uiux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fritzprix/libr-agent#2447 ·
Los mantenedores suelen responder en 1 día
-
bug low priority
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100