git-ai-project/git-ai

Exclude empty .git dirs from valid git repo detection

Closed

#1,415 opened on May 21, 2026

 (0 comments) (0 reactions) (0 assignees)Rust (231 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (2,272 stars)
PR merge metrics
 (PR metrics pending)

Description

Git AI uses the presence of a .git dir to determine whether a directory is a git repo to save the overhead of shelling out to git. Add additional guardrails (without degrading performance) to ensure that the .git is real

Original discussion: https://github.com/git-ai-project/git-ai/issues/1041#issuecomment-4481683285

Contributor guide