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>
866 B
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 branchtopic, then rungit checkout --orphanwith the nametopicfollowed by U+00A0 (non-breaking space). Git accepts the name;for-each-reffor its exactrefs/heads/topic<U+00A0>target succeeds silently with no results.born()instead queries the existingrefs/heads/topicand 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.