Re: BUG FOLLOWUP: Case insensitivity in worktrees
From: Casey Meijer <hidden>
Date: 2020-07-24 18:14:07
I think I misunderstood your claim actually Brian. What is a bug is asking for worktree A's head and getting the main worktree's head. A super dangerous bug.
I certainly disagree with your assertion that asking for head and not getting HEAD (or HeaD or hEAd) on a case-insensitive storage engine isn't a bug and it certainly
shouldn't be a bug once extensible storage engines are in place: the storage engine should have final say on how objects are stored and retrieved, not git-core.
Best,
Casey
On 2020-07-23, 10:19 PM, "brian m. carlson" [off-list ref] wrote:
On 2020-07-23 at 15:20:50, Casey Meijer wrote:
> This just bit me; it seems quite old, and I wanted to propose an alternative solution (maybe it doesn’t work for some reason I’m unaware of):
> https://marc.info/?l=git&m=154473525401677&w=2
>
> Why not just preserve the existing semantics of the main worktree by checking the worktree refs first unconditionally and only fall back to the main refs when the ref doesn’t exist locally in the worktree?
>
> This would have the added benefit of allowing power users to override refs in their worktrees and would, if I’m not mistaken, preserve the semantics of the main worktree in case-insensitive and case-sensitive filesystems.
It isn't clear to me exactly what you're suggesting. Are you suggesting
that we allow "head" instead of "HEAD" in worktrees, or that we allow
refs in general to be case insensitive, or something else?
> Anywho, just a thought. I could work on a patch if this approach makes sense at least as an intermediary until there’s a pluggable storage backend for non-FS stores 😉 (I'd also be somewhat interested in implementing a postgres/sql storage backend if this project is moving forwards __ ).
There is a proposal for a ref storage backend called "reftable" which
will not store the ref names in the file system, and work is being done
on it. There has been a suggestion for an SQLite store in the past, but
that causes problems for certain implementations, such as JGit, which do
not want to have C bindings.
--
brian m. carlson: Houston, Texas, US