Skip to content

YOU-46: Review-gate hook no longer blocks pushes with shell redirections - #42

Merged
JtheGunner merged 3 commits into
mainfrom
fix/YOU-46-review-gate-hook-push-shell-redirection
Dec 2, 2026
Merged

JtheGunner merged 3 commits into
mainfrom
fix/YOU-46-review-gate-hook-push-shell-redirection

Conversation

@JtheGunner

Copy link
Copy Markdown
Owner

YouTrack: https://youtrack.xn--wrm-hoa.li/issue/YOU-46

hooks/require-review now removes shell redirections and their targets before parsing a command, so 2>&1, >file and the like are no longer read as refspecs (0.22.1). A push with a redirection in front of it is now checked too. A target containing a substitution or a backslash is left in place, so such a push stays denied.

Commits:

  • fix: ignore shell redirections in the review-gate hook
  • fix: keep substitutions and the background operator intact in the review-gate hook
  • fix: keep a redirection target with a backslash in the review-gate hook

Test plan:

  • all tests/*.sh suites (macOS)
  • ShellCheck on hooks and scripts
  • CI on Ubuntu (first run against GNU sed)

@JtheGunner
JtheGunner merged commit 1e902b9 into main Dec 2, 2026
2 checks passed
@JtheGunner
JtheGunner deleted the fix/YOU-46-review-gate-hook-push-shell-redirection branch December 2, 2026 23:23
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