Files
ElyOffice/tasks/reviews/G-03-r3.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

866 B

FAIL

  • apps/ely-tree/src/git.rs:84 — .trim() changes valid branch names before checking whether their refs exist, so a valid unborn HEAD still produces repository-page errors (TREE-01, TREE-12, TREE-13). Reproduced on native Windows and WSL Linux: in a committed repository, create branch topic, then run git checkout --orphan with the name topic followed by U+00A0 (non-breaking space). Git accepts the name; for-each-ref for its exact refs/heads/topic<U+00A0> target succeeds silently with no results. born() instead queries the existing refs/heads/topic and returns an error, causing both reflog and LFS to return errors instead of empty lists. Remove only Git's output line terminator, preserve the ref name, and add a regression covering this valid unborn branch. Evidence: .work/G-03-r3/windows-probe.log, .work/G-03-r3/linux-probe.log.