Skip to content
  • Sami Hiltunen's avatar
    5676ec7d
    Record repository creations during transaction · 5676ec7d
    Sami Hiltunen authored
    Repository creations operations are currently recorded in the
    transaction manager at commit time. However, it's not the
    transaction manager's responsibility to record the operations
    the transactions are doing. Previously we didn't expose methods
    on the transaction to do this in the handlers. Now we do, so
    move ove the repository creations to be  recorded as part of
    repoutil.Create which is used everywhere to create the repository.
    This simplifies both transaction manager and makes it easier to
    move other operations out from transaction manager.
    
    We also do a full repack prune unreachable objects out from the
    repositories. This was done in the transaction manager prior to
    moving the recording operations out. The purpose is to ensure
    all objects have their dependencies satisfied. Git only guarantees
    the connectivity of reachable objects but not the unreachable ones.
    Now that the handlers are recording the creations, they need to
    ensure the repository is in its final shape before we log the files.
    
    Full repacking is the existing behavior so we keep things as they
    are for now. In reality, full repacking is not necessary if we just
    walk all introduced objects to ensure their dependencies are met.
    5676ec7d
    Record repository creations during transaction
    Sami Hiltunen authored
    Repository creations operations are currently recorded in the
    transaction manager at commit time. However, it's not the
    transaction manager's responsibility to record the operations
    the transactions are doing. Previously we didn't expose methods
    on the transaction to do this in the handlers. Now we do, so
    move ove the repository creations to be  recorded as part of
    repoutil.Create which is used everywhere to create the repository.
    This simplifies both transaction manager and makes it easier to
    move other operations out from transaction manager.
    
    We also do a full repack prune unreachable objects out from the
    repositories. This was done in the transaction manager prior to
    moving the recording operations out. The purpose is to ensure
    all objects have their dependencies satisfied. Git only guarantees
    the connectivity of reachable objects but not the unreachable ones.
    Now that the handlers are recording the creations, they need to
    ensure the repository is in its final shape before we log the files.
    
    Full repacking is the existing behavior so we keep things as they
    are for now. In reality, full repacking is not necessary if we just
    walk all introduced objects to ensure their dependencies are met.
Loading