Skip to content

fix(pre-commit): validate staged blob sizes - #12

Merged
taigrr merged 1 commit into
masterfrom
cd/round9-20261026
Nov 9, 2026
Merged

taigrr merged 1 commit into
masterfrom
cd/round9-20261026

Conversation

@taigrr

@taigrr taigrr commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Check staged blob sizes rather than the working tree, preventing unstaged edits/removal from bypassing the size limit or causing false rejections.
  • Read NUL-delimited staged paths to preserve spaces, newlines, and glob characters; exclude staged deletions.
  • Add regressions for partially staged files, missing working copies, and unusual filenames.

Validation

  • All four shell regression suites pass.
  • ShellCheck passes for all hooks, installation scripts, and tests.
  • git diff --check passes.
  • The staged-large/working-small regression fails against the original implementation.

@taigrr
taigrr merged commit 132a5ab into master Nov 9, 2026
1 check passed
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