[GH-ISSUE #416] Feature Request: The issue of abnormal statistics of AI code quantity in the git submodule mechanism needs to be fixed. #156

Closed
opened 2026-03-02 04:12:21 +03:00 by kerem · 1 comment
Owner

Originally created by @H1iY on GitHub (Jan 29, 2026).
Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/416

Problem Description

Currently, when using the git submodule mechanism, the git-ai tool will cause all the functions of commands such as git-ai status and git-ai stats (which are related to the proportion of AI code) to become completely ineffective.

Use Case

Scenario: Under the git submodule mechanism, a/b master-slave repository structure will be formed.

workspace/                    (NOT a git repository)
├── project-frontend/          (git repo A)
│   ├── .git/
│   └── src/
│   └── plugins/
│       └── sub-project/
│           └── package.json
│   └──  package.json

Common use cases:

  • When developing the extension point functionality

  • Shared libraries in microservice architecture

project/
├── core/           # Core module (sub-module)
├── auth-service/   # Authentication Service (Sub-module)
└── api-gateway/    # API Gateway (Sub-module)

Expected Behavior:

git-ai should:
Being able to run commands such as git-ai status under the git submodule mechanism enables the normal display of the code ratio of the AI.

Environment

git-ai version: 1.0.37
OS: Windows
IDE: VSCode, Cursor
AI tools: Cursor AI

Suggested Implementation

Approach 1: Layered Git detection

  • For each edited file, detect its git repository by walking up the directory tree
  • Create separate checkpoint/working log for each detected git repository
  • Maintain mapping of files to their respective git repositories

This is a critical feature for:

For developers who use the git submodule mechanism, git-ai is completely ineffective.

Originally created by @H1iY on GitHub (Jan 29, 2026). Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/416 # Problem Description Currently, when using the git submodule mechanism, the git-ai tool will cause all the functions of commands such as git-ai status and git-ai stats (which are related to the proportion of AI code) to become completely ineffective. # Use Case Scenario: Under the git submodule mechanism, a/b master-slave repository structure will be formed. ``` workspace/ (NOT a git repository) ├── project-frontend/ (git repo A) │ ├── .git/ │ └── src/ │ └── plugins/ │ └── sub-project/ │ └── package.json │ └── package.json ``` # Common use cases: - When developing the extension point functionality - Shared libraries in microservice architecture ``` project/ ├── core/ # Core module (sub-module) ├── auth-service/ # Authentication Service (Sub-module) └── api-gateway/ # API Gateway (Sub-module) ``` # Expected Behavior: git-ai should: Being able to run commands such as git-ai status under the git submodule mechanism enables the normal display of the code ratio of the AI. # Environment > git-ai version: 1.0.37 > OS: Windows > IDE: VSCode, Cursor > AI tools: Cursor AI # Suggested Implementation Approach 1: Layered Git detection - For each edited file, detect its git repository by walking up the directory tree - Create separate checkpoint/working log for each detected git repository - Maintain mapping of files to their respective git repositories # This is a critical feature for: For developers who use the git submodule mechanism, git-ai is completely ineffective.
kerem closed this issue 2026-03-02 04:12:22 +03:00
Author
Owner

@svarlamov commented on GitHub (Feb 8, 2026):

We have since migrated the git-ai stats command to use diffs to calculate stats accurately, on-demand. This issue should be fixed in the latest release

<!-- gh-comment-id:3865924154 --> @svarlamov commented on GitHub (Feb 8, 2026): We have since migrated the git-ai stats command to use diffs to calculate stats accurately, on-demand. This issue should be fixed in the latest release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#156
No description provided.