Skip to content

Git review silently omits untracked files after the first 200 #271

Description

@cristicretu

Working/branch diff loading stops after 200 untracked files without indicating an incomplete review. The status-based Stage all action can still stage the omitted files.

Reproduction and observed result

  1. Initialize a repository with a committed baseline.
  2. Create 201 small untracked text files.
  3. Load Git status and the Working diff.

An isolated Rust harness importing the production Git review and diff modules reported:

actual untracked: 201
displayed files: 200
truncated: false

The regression assertion that all files be present OR the snapshot be marked incomplete failed. The fixture used tiny one-line files, so the byte-size limit was not involved.

Code evidence

  • append_untracked_diffs applies .take(MAX_UNTRACKED_FILES) to the untracked path list.
  • load_diff_from_repository computes truncated only from the accumulated patch byte count. It never records that the file-count limit skipped files.
  • The inspector's Stage all path list comes from the complete Git status, including all untracked paths. It is not limited to the files present in the diff snapshot.

A generated project or a large import can therefore include files in a bulk stage operation that the review never displayed, without an incomplete-review notice.

Expected behavior and coverage

Keeping a bounded preview is reasonable, but expose file-count truncation explicitly, with the number omitted when available. Make the bulk-action scope clear when it includes omitted files; provide a way to inspect them.

Test 199, 200, and 201 small untracked files separately from byte-size truncation. Assert that the 201-file case reports the omission and that any warning accurately describes which limit was reached.

Validated against main 1196d89 with a real Git fixture and unchanged production Rust modules. No product files were modified.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions