2 ms·
> that sounds an awful lot like something one might call a "staging" area. What you call it is one thing. The actual code behind git's official "staging" impl
by stonogo 8y ago
> that sounds an awful lot like something one might call a "staging" area.
What you call it is one thing. The actual code behind git's official "staging" implementation is basically an entire magical branch on-disk. The staging code is a big part of why git submodules are so awkward. I don't even use Plan 9, but I'm interested in this implementation.
- ori_b 8y agoAnd that's before you take into account that the staging area's index makes some very interesting decisions: - Maximum file size of 4g -- but this limit is only present in the staging area, which means it's possible to construct repos with files that can't be checked out into the index. - Dates have the year 2038 problem. - Contains non-portable stat fields like the device the file was on. - Requires a complete rewrite of the whole index file on every change, making it scale O(n) in the size of the repository. - Requires padding of data fields to 8 bytes -- but then has 12 byte header which the fields are packed after, making all of them misaligned to 4 bytes. The whole thing screams "thoughtless, bleary-eyed 3 AM hack"
- Izkata 8y ago> but I'm interested in this implementation. From the user-visible side, it sounds like svn's tracked files, which trip up my co-workers more than git's staging area despite having used svn much longer.