claw-code/rust/crates/rusty-claude-cli
YeonGyu-Kim 9677eb7ada fix(#161): resolve actual HEAD path in git worktrees for correct Git SHA in build metadata
Problem: In git worktrees, .git is a pointer file (not a directory), so cargo's
rerun-if-changed=.git/HEAD never triggers when commits are made. This causes
claw version to report a stale SHA after new commits.

Solution: Add resolve_git_head_path() helper that detects worktree mode:
- If .git is a file: parse gitdir pointer, watch <gitdir>/HEAD
- If .git is a directory: watch .git/HEAD (regular repo)

This ensures build.rs invalidates on each commit, making version output truthful.

Verification: Binary built in worktree now reports correct SHA after commits
(before: stale, after: current HEAD).

Relates to ROADMAP #161 (filed cycle #65, implemented cycle #69).
Diagnostic-strictness family member.
Diff: 21 lines added (resolve_git_head_path + conditional rerun-if-changed).
2026-04-30 11:03:06 +09:00
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix(#130e-B): route plugins/prompt --help to dedicated help topics 2026-04-30 11:03:06 +09:00
tests fix: #247 classify prompt-related parse errors + unify JSON hint plumbing 2026-04-30 11:03:06 +09:00
Cargo.toml Close the clawability backlog with deterministic CLI output and lane lineage 2026-04-05 18:41:02 +00:00
build.rs fix(#161): resolve actual HEAD path in git worktrees for correct Git SHA in build metadata 2026-04-30 11:03:06 +09:00