Bug Fixes
-
tolerate NUL suffixes in symbolic ref files
Loose symbolic ref files can contain bytes after a NUL terminator. Git treats
those bytes as invisible when reading the referent, so a HEAD file like
'ref: refs/heads/main\0...' still resolves to refs/heads/main.gitoxide read the entire line until CR/LF before validating the symbolic target,
which made the embedded NUL fail refname validation.Match Git by stopping symbolic target parsing at the first NUL byte, while
leaving direct object ref parsing unchanged.Git baseline: local Git checkout 7760f83b59, refs/files-backend.c
parse_loose_ref_contents() uses C-string semantics for symbolic referents;
'git symbolic-ref HEAD' returns refs/heads/main for a HEAD containing
'ref: refs/heads/main\0codex-hidden-head-metadata: status-clean-demo'. -
skip name validation in packed-refs binary search to unlock performance
-
handle loose ref path-prefix collisions
The GitButler branch creation flow reported that
repo.try_find_reference("refs/heads/A/new")could fail with a low-level
NotADirectoryerror whenrefs/heads/Aalready exists as a loose ref. That
lookup is asking whether the longer ref exists; the path-prefix collision
matters to creation/update code, but find should report absence for that
candidate.Git reference:
refs/refs-internal.hdocumentsENOTDIRas the case where a
ref prefix is not a directory, alongsideENOENTfor non-existing refs. For
lookup, both mean the requested ref candidate was not found.
Commit Statistics
- 9 commits contributed to the release over the course of 27 calendar days.
- 27 days passed between releases.
- 3 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #2658 from GitoxideLabs/compliant-ref-parser (1514b0f)
- Tolerate NUL suffixes in symbolic ref files (5d702e3)
- Merge pull request #2604 from nikicat/skip-validation-in-binary-search (66f70f3)
- Review (a8b885d)
- Skip name validation in packed-refs binary search to unlock performance (c3ee599)
- Merge pull request #2645 from GitoxideLabs/try-find-reference-path-prefix-collision (4f089fc)
- Handle Windows ref path-prefix collisions in ref_contents (c9191ab)
- Handle loose ref path-prefix collisions (9f432ef)
- Merge pull request #2618 from GitoxideLabs/report (f7d4f33)