Deduplicate blobs

andybalholm
Mar 11, 2023, 11:13 PM
NXJB3UTCVQZWUD5DKP7QOV2Y6LNS4AHZBC3SOKGLUKUISSB4QBZAC

Dependencies

  • [2] P2B4ZSO5 Include file content
  • [3] 5ETDKF5F Start on data structures to represent fast-export stream
  • [4] K23EJ6EJ Process commits in reverse

Change contents

  • edit in fast-export.go at line 4
    [3.305]
    [3.305]
    "crypto/sha512"
  • replacement in fast-export.go at line 94
    [3.385][3.385:396]()
    marks int
    [3.385]
    [3.396]
    marks int
    blobIndex map[[64]byte]int
  • edit in fast-export.go at line 128
    [2.2317]
    [2.2317]
    hash := sha512.Sum512(data)
    if mark, ok := f.blobIndex[hash]; ok {
    return mark
    }
  • edit in fast-export.go at line 138
    [2.2404]
    [2.2404]
    if f.blobIndex == nil {
    f.blobIndex = make(map[[64]byte]int)
    }
    f.blobIndex[hash] = b.Mark