Repository navigation
Add samebytes' stat-cache hook, its LF pin, and a CI job that checks the copies - #3
Merged
Merged
Conversation
…the copies .githooks/ is samebytes v0.1.0's packaged hook (drive-restat.sh and the three post-* hooks that run it), tracked executable; .gitattributes pins it to LF so a Windows clone cannot check it out CRLF; the `hooks` CI job fails on drift, CRLF, a missing eol pin or a missing executable bit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tree lives in a synced folder (OneDrive), where git's stat cache goes stale: the sync client reports a placeholder file size right after a checkout, every later
git statuscalls the file modified, andgit merge --ff-only/git checkoutrefuse on changes that do not exist. economicspace has carried a hook for this since 2026-08; it now ships in samebytes v0.1.0, and this gives the same hook to this repo..githooks/(drive-restat.sh plus post-checkout, post-merge and post-rewrite), byte for byte samebytes' packaged copies, tracked executable. The repair re-stats only entries whose content already matches the index, so it cannot stage, hide or discard a real edit..gitattributespins.githooks/* text eol=lf; without it a Windows clone (core.autocrlf true) checks the hooks out CRLF and#!/bin/shfails silently.hooksCI job runspython -m samebytes hooks check ., which fails on drift, CRLF, a missing eol pin or a missing executable bit.git config core.hooksPath .githooks(already set on this machine).No package code changes, no release.
Verified locally:
samebytes hooks check --require-configclean; the test suite passes.