Skip to content

[experiment B] #138 warn when git status has uncommitted files (Part of #4479) - #6393

Closed
squid-protocol wants to merge 1 commit into
mainfrom
experiment/4479-r3-B
Closed

squid-protocol wants to merge 1 commit into
mainfrom
experiment/4479-r3-B

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What changed

gitgalaxy/galaxyscope.py: new _untracked_files(root) and _warn_untracked(list) helpers. Orchestrator._build_file_census now logs one warning (count, first five names, "git add to include") when git ls-files --others --exclude-standard finds files. The delta-scan path (#4483) had the same warning inline; it now uses the shared helpers.

Root cause

The full-scan census is git ls-files, which only lists tracked files, so untracked files were silently skipped (only the delta path warned). Modified-but-unstaged tracked files ARE listed and read from disk, so they are scanned and need no warning.

Tests

tests/core_engine/test_untracked_warning_138.py (8 tests): untracked listed, modified-unstaged not flagged, clean/ignored/staged-new not flagged, non-git dir, git missing, message truncation, and the real census warning.

Class / Sibling gaps

  • Single-file targets skip the warning on purpose (no census).
  • chronometer.py also runs git ls-files and has no untracked notice.
  • Warning is log-only: not in the report, SARIF or the DB, and no --include-untracked option exists.
  • Lens-only or other entry points that bypass _build_file_census are not covered.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant