Repository navigation
Conversation
Omer26-26
marked this pull request as ready for review
December 6, 2026 20:29
This branch has not been deployed
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.
Problem
hooks installwrites scripts to the repository's own Git hooks directory. Ifcore.hooksPathis configured later,hooks uninstallfollows that path instead: the installed scripts remain and a shared hook directory may be modified.Change
core.hooksPath. Strip only Git's output line ending, preserving trailing spaces in valid paths.core.hooksPath).Fixes #167.
Reproduce and verify
proofline hooks install. Confirm.git/hooks/pre-commitand.git/hooks/pre-pushexist..husky/pre-commit, then rungit config core.hooksPath .husky.proofline hooks uninstall. Confirm the repository-owned scripts are gone,.husky/pre-commitis untouched, and the CLI prints manual cleanup guidance for the custom path..git/hookswith a symlink to an external shared directory; install writes nothing there, and uninstall leaves it untouched with and withoutcore.hooksPath.Automated checks on Windows:
cargo +stable fmt --check— passed.cargo +stable test --test hooks uninstall_— all three applicable uninstall tests passed.cargo +stable test --lib git_common_dir_keeps_trailing_spaces— passed.a_push_reviews_the_branches_it_updates_and_skips_tags_and_deletions). The failing test also fails on an unchanged checkout: its local bare push remote is rejected as not naming a hosted repository.Proofline feedback
I installed Proofline on my own fork and ran a PR review. It found two real edge cases:
trim()could remove a trailing space in the Git directory name, and a symlinked.git/hookscould point outside the repository. I addressed both in0db9391and added tests. A follow-up review pointed out that the Unix symlink test covered only a configuredcore.hooksPath;4d81210now runs that test with the setting both present and absent. I kept shared hook files under manual ownership rather than deleting them automatically.The follow-up review also found that install could still write through an external symlink while uninstall refused to remove it. Commit
9f5ddaenow applies the same containment check to both operations and adds an install regression test. Review run 3 completed on9f5ddaewith no findings.