[darcs-devel] [issue2318] hashed_inventory is vulnerable to unguided search and replace
Ben Franksen
bugs at darcs.net
Mon Aug 10 10:12:21 UTC 2020
Ben Franksen <ben.franksen at online.de> added the comment:
> I think 'head' is a good idea. Is your intention to keep writing out both
> head and hashed_inventory to maintain backwards compatibility?
I see no other option if we want to maintain compatibility with existing
darcs versions.
> If so one option would be to read both and let hashed_inventory
> override head if they differ.
If we do that then a corrupt hashed_inventory will take precedence, too,
so we wouldn't gain anything regarding the issue at hand.
> It feels messy though and I would worry a bit about atomicity.
The messiness can be handled with suitable engineering (i.e. encapsulation).
I haven't given any thought to atomicity yet, but I don't expect this to
be a serious problem. (I may be wrong about that.)
I think the correct way to handle compatibility is by adding a new
format property as an alternative to "hashed"; let me use "head" as a
stawman. It means a repo with
hashed|head
can be read but not modified by darcs versions that don't know "head".
A better name for the format property might be "branched" or just "branch".
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2318>
__________________________________
More information about the darcs-devel
mailing list