MCPcopy Create free account
hub / github.com/antonmedv/gitmal / Close

Method Close

pkg/gitdiff/apply_binary.go:67–79  ·  view source on GitHub ↗

Close writes any data following the last applied fragment and prevents future calls to ApplyFragment.

()

Source from the content-addressed store, hash-verified

65// Close writes any data following the last applied fragment and prevents
66// future calls to ApplyFragment.
67func (a *BinaryApplier) Close() (err error) {
68 if a.closed {
69 return nil
70 }
71
72 a.closed = true
73 if !a.dirty {
74 _, err = copyFrom(a.dst, a.src, 0)
75 } else {
76 // do nothing, applying a binary fragment copies all data
77 }
78 return err
79}
80
81func applyBinaryDeltaFragment(dst io.Writer, src io.ReaderAt, frag []byte) error {
82 srcSize, delta := readBinaryDeltaSize(frag)

Callers

nothing calls this directly

Calls 1

copyFromFunction · 0.85

Tested by

no test coverage detected