OPS: Harden Windows Git resolution and index.lock reliability#472
OPS: Harden Windows Git resolution and index.lock reliability#472Chris0Jeky merged 5 commits intomainfrom
Conversation
Diagnostic script that checks: - Whether git resolves to Git for Windows (not Cygwin) - Whether a stale .git/index.lock exists without active git processes Outputs actionable remediation guidance for each issue. Closes #121
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Use git rev-parse --git-dir to resolve the actual git directory instead of assuming .git is always a directory. In worktrees, .git is a file pointing elsewhere.
Self-ReviewFindingsBug found and fixed (commit 8ca8896):
Remaining observations (no action needed)
Acceptance criteria coverage
|
Fresh Adversarial ReviewCritical Issues1.
Reproduction: cd /tmp
bash /path/to/scripts/check-git-env.sh /path/to/repo
# Lock check looks at /tmp/.git/index.lock instead of /path/to/repo/.git/index.lockFix: Prepend Minor Issues2. File mode should be 755, not 644 The script is 3. Comment says "Cygwin" but The case pattern Observations
VerdictOne real bug to fix (the relative |
… set +x mode - Use --absolute-git-dir instead of --git-dir to prevent lock-file check from resolving against CWD instead of REPO_DIR when invoked with an explicit path argument from a different working directory - Update detection comment to note /usr/bin/git also matches MSYS2 (non-MinGW) git, not just Cygwin - Set executable bit on the shell script (644 -> 755)
Summary
scripts/check-git-env.shdiagnostic script that validates git resolves to Git for Windows (not Cygwin) and detects stale.git/index.lockfiles with no active git processCLAUDE.mdandAGENTS.mdWindows sections to reference the new script and add PATH remediation guidanceCloses #121
Validation
Test plan
bash scripts/check-git-env.shon a Windows machine with Git for Windows — should pass.git/index.lockwith no git processes — script should detect and advise removal