Files
ElyOffice/tasks/reviews/G-03-r2.md
T
ZacharyZhang-NYandClaude Opus 5.5 30801ad24b ElyTree: an unborn HEAD is told from a broken one (G-03, in review)
born() takes a HEAD as new only when it names a branch under
refs/heads/ that no ref holds yet; a broken ref, a tag target or any
other state is an error in Git's words. The branch name keeps every
byte. Round 3 is fixed; round 4 waits until 0.1.3 ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:00:55 -04:00

4 lines
795 B
Markdown

FAIL
- apps/ely-tree/src/git.rs:86 — `born()` accepts an absent symbolic reference outside `refs/heads/` as an unborn branch, still hiding real Git errors (rule 2). Reproduction on native Windows and WSL Linux: initialize a repository, then run `git symbolic-ref HEAD refs/tags/missing`. `rev-parse --verify -q HEAD` exits 1, `symbolic-ref -q HEAD` succeeds, and `for-each-ref` finds nothing; `born()` returns `Ok(false)` and both reflog and LFS return `Ok([])`, although `git reflog show HEAD --` fails with `fatal: bad revision 'HEAD'`. Require the resolved symbolic target to be a branch under `refs/heads/` before accepting it as unborn; otherwise surface Git's diagnostic, and add a regression for this case. Evidence: `.work/G-03-r2/windows-probe.log`, `.work/G-03-r2/linux-probe.log`.