Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0e4e289f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fi | ||
|
|
||
| # Guard: refuse to run if there are nested git repos (prevents submodule/gitlink accidents) | ||
| if find . -mindepth 2 -maxdepth 6 -name .git -type d | grep -q .; then |
There was a problem hiding this comment.
Detect
.git files when guarding nested repos
The new safety guard only searches for .git directories (find ... -name .git -type d), but Git submodules and linked worktrees use a .git file, so this check silently misses the common nested-repo case it is meant to block. In repositories that include submodules, the script will continue and can still stage gitlink updates via git add -u, which undermines the hardening goal and can lead to accidental submodule pointer commits.
Useful? React with 👍 / 👎.
Make scripts/pr.sh safe: refuse nested repos, avoid git add -A, allow optional path args; default to git add -u.