As discussed in patch1823, we should revisit the in-memory and on-disk
representations of V3 patches before we are finally committed to them
(particularly the on-disk format). The issue is the patch names
in the primitive patches contained within a full patch.
Firstly, we could remove patch names/hashes from the on-disk format of
prims in the common case where they are the same as the containing
patch (i.e. not coming from a conflict with another patch). This
seems uncontroversial except that isn't trivial implementation-wise.
Secondly, we could replace SHA1s with the full patch names. To get
good memory usage this would require hash-consing on read, and
to get fast equality it would require reallyUnsafePtrEquality.
Personally I think that (at least on-disk) it would make our
representation more transparent and avoid tying us to a particular
hash type. But it's not clearly better.