Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Batch line count lookups for large diffs - #9

Closed
codewarnab wants to merge 1 commit into
nilbuild:mainfrom
codewarnab:codex/parallel-batch-line-counts
Closed

Batch line count lookups for large diffs#9
codewarnab wants to merge 1 commit into
nilbuild:mainfrom
codewarnab:codex/parallel-batch-line-counts

Conversation

@codewarnab

Copy link
Copy Markdown

This batches file line-count retrieval for diff views so large change sets (1k+ files) no longer pay one git show call per file.

What changed:

  • added getFileLineCounts in @diffity/git using a single git cat-file --batch call
  • updated the CLI diff route to use the batched helper
  • removed temporary debug/timing logs
  • updated git package tests for the new batch path
  • fixed Windows-safe cleanup in existing git tests

Validation:

  • npm run test -w @diffity/git
  • npm run build -w diffity

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why:

rm is a Unix shell command and breaks on Windows
rmSync is cross-platform, so the tests run reliably in this environment too

@nilbuild nilbuild closed this Mar 29, 2026
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.

2 participants