• Kirill Smelkov's avatar
    Switch xload_tag() too work without spawning Git subprocess · 5b1cdca3
    Kirill Smelkov authored
    We can reuse ReadObject() like for blob_to_file().
    
    We cannot drop xload_tag() in favor of Repository.LookupTag() because
    upon tag loading we need to have not only parsed tag, but also its raw
    content for encoding in another object.
    
    Time for restoring kirr/slapos.git from lab.nexedi.com backup
    
    before: 8.9s
    after:  7.4s
    
    ( it goes down because on restore restored tags are reencoded again to
      verify restoration was ok. Pulling time should go down appropriately
      as well )
    5b1cdca3
gitobjects.go 3.8 KB