Artifact 33bd4839407c9ee87c7adb94e31c213579214530c64d6edda25d5a6090c6541f:
- File
src/git_import.zig
— part of check-in
[f0331d2f5a]
at
2026-07-31 19:25:02
on branch sub-manifest
— import-git: refs that differ only by case collide, and say so
sqlite carries refs/remotes/origin/EQP-improvements and .../eqp-improvements pointing at different commits. Both are legal, distinct git refs. Zit stores a ref by creating a file at its canonical path, so on APFS the second one landed on the first: bare PathAlreadyExists, raised by writeRefs during publication, after 49 minutes of completed import. No ref name, no cause.
The refusal already existed. finalizeRefs rejects two source refs that resolve to one canonical leaf -- 'refs/heads/./release' against 'refs/heads/release' is a tested case. It just compared bytes, and a filesystem does not. Keying the canonical index by an ASCII fold makes the existing rule see the collision it was written to catch, uniformly, instead of leaving it to whichever disk the import ran against.
ASCII rather than Unicode is deliberate and documented at the fold: APFS, HFS+ and NTFS each fold a different frozen table, so following them would make the importable set depend on the volume. A-Z is what they agree on.
The error now names both source refs, both canonical spellings, and whether case alone separates them -- a normalization clash and a case clash want different fixes from the operator. Retained on the importer and formatted by the CLI, the same split FileCommandOverrun uses.
This refuses on Linux what Linux tolerated, which is the point: the repository means the same thing everywhere or it is not portable. Making sqlite importable rather than merely diagnosable is a layout question -- one file per ref cannot represent it -- and stays open. (user: dmestas, size: 1319) [annotate] [blame] [check-ins using]
const implementation = @import("git_import_impl.zig"); pub const TreeStore = implementation.TreeStore; pub const TreeFormat = implementation.TreeFormat; pub const RootView = implementation.RootView; pub const TreeCommand = implementation.TreeCommand; pub const BuildResult = implementation.BuildResult; pub const TreeError = implementation.TreeError; pub const LoadedBytes = implementation.LoadedBytes; pub const TreeStoreError = implementation.TreeStoreError; pub const Attribution = implementation.Attribution; pub const UserOptions = implementation.UserOptions; pub const WorkCounters = implementation.WorkCounters; pub const ResolvedOptions = implementation.ResolvedOptions; pub const resolveOptions = implementation.resolveOptions; pub const analyzeSubmanifestK = implementation.analyzeSubmanifestK; pub const modeFromGit = implementation.modeFromGit; pub const CommitMarkState = implementation.CommitMarkState; pub const FinalizeOptions = implementation.FinalizeOptions; pub const FinalizedRef = implementation.FinalizedRef; pub const FinalizedRefs = implementation.FinalizedRefs; pub const RefCollision = implementation.RefCollision; /// Production imports always use the incremental tree writer. pub const Importer = implementation.Importer(implementation.IncrementalTreePolicy, implementation.NoopObserver);