Skip to content
Snippets Groups Projects
Select Git revision
0 results

jgit

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Shawn Pearce authored
    The only current consumer of these collections is ReceivePack,
    where it needs to test ObjectId equality between a RevObject and an
    ObjectId.  There we were copying from a traditional HashSet<ObjectId>
    into an ObjectIdSubclassMap<ObjectId>, as the latter can perform
    hashing using ObjectId's native value support, bypassing RevObject's
    override on hashCode() and equals().  Instead of doing that copy,
    directly create ObjectIdSubclassMap instances inside of ReceivePack.
    
    We also only need to record the objects that do not appear in the
    incoming pack, and were therefore copied from the local repositiory
    in order to complete delta resolution.  Instead of listing everything
    that used an OBJ_REF_DELTA format, list only the objects that we
    pulled from the destination repository via a normal ObjectLoader.
    
    ReceivePack can now discard the IndexPack object, and all of its
    other data, as soon as these collections are held by the check
    connectivity method.  This frees up memory for the ObjectWalk's
    own RevObject pool.
    
    Change-Id: I22ef71b45c2045a0202e7fd550a770ee1f6f38a6
    Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
    2bb8defa
    History
    Name Last commit Last update