fork of go-git with some jj specific features
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1463 from christian-roggia/main

plumbing: make objfile closing idempotent

authored by

Paulo Gomes and committed by
GitHub
adcc06bf 0a58f42e

+10
+10
plumbing/format/objfile/writer.go
··· 25 25 26 26 closed bool 27 27 pending int64 // number of unwritten bytes 28 + 29 + closeErr error 28 30 } 29 31 30 32 // NewWriter returns a new Writer writing to w. ··· 101 103 // 102 104 // Calling Close does not close the wrapped io.Writer originally passed to 103 105 // NewWriter. 106 + // 107 + // It returns an error, if any. Close will return the same error if called 108 + // multiple times. 104 109 func (w *Writer) Close() error { 110 + if w.closed { 111 + return w.closeErr 112 + } 113 + 105 114 defer sync.PutZlibWriter(w.zlib) 106 115 if err := w.zlib.Close(); err != nil { 116 + w.closeErr = err 107 117 return err 108 118 } 109 119