• Show log

    Commit

  • Hash : c976b4f9
    Author : Patrick Steinhardt
    Date : 2018-12-01T10:18:26

    indexer: use map iterator to delete expected OIDs
    
    To compute whether there are objects missing in a packfile, the indexer keeps
    around a map of OIDs that it still expects to see. This map does not store any
    values at all, but in fact the keys are owned by the map itself. Right now, we
    free these keys by iterating over the map and freeing the key itself, which is
    kind of awkward as keys are expected to be constant.
    
    We can make this a bit prettier by inserting the OID as value, too. As we
    already store the `NULL` pointer either way, this does not increase memory
    usage, but makes the code a tad more clear. Furthermore, we convert the
    previously existing map iteration via indices to make use of an iterator,
    instead.