Skip to content

v0.5.538

@byronellis byronellis tagged this 25 Oct 19:52
## Summary

No existing issue is linked. Fix Gradle hook installation in linked
worktrees by resolving the hooks directory through Git, where `.git` is
a file rather than a directory. Both existing hooks continue to be
installed.

## Changes

- [ ] Client-facing API Changes
- [ ] Internal API Changes
- [x] Bug Fixes
- [ ] New Features
- [ ] Performance Improvements
- [ ] Code Style
- [ ] Refactoring
- [ ] Documentation
- [ ] Tests

For all the boxes checked, please include additional details of the
changes made in this pull request.

`CopyGitHooksTask` now resolves the repository's hooks path with `git
rev-parse --git-path hooks`, allowing Gradle tasks and the existing
pre-commit/pre-push hooks to work in linked worktrees.

## Testing Done
<!--- Check any relevant boxes with "x" -->

- [ ] Manually Tested on local docker setup. Please include commands
ran, and their output.
- [ ] Added new tests for the changes made.
- [ ] Updated existing tests to reflect the changes made.
- [x] No tests added or updated. Please explain why. If unsure, please
feel free to ask for help.
- [x] Some other form of testing like staging or soak time in
production. Please explain.

For all the boxes checked, include a detailed description of the testing
done for the changes made in this pull request.

No dedicated test source was added for this build configuration change.
Validation in a linked worktree:
- `./gradlew spotlessCheck CopyGitHooksTask --no-daemon -q` — passed
without excluding `CopyGitHooksTask`.
- `git diff --check` — passed.
- Verified installed `pre-commit` and `pre-push` hooks match the
repository scripts and are executable. The pre-commit hook also ran
`./gradlew spotlessCheck -q --daemon` successfully during commit.

# Additional Information

- [ ] Breaking Changes
- [ ] Deprecations
- [ ] Large PR broken into smaller PRs, and PR plan linked in the
description.

For all the boxes checked, include additional details of the changes
made in this pull request.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Assets 2
Loading