From dbe032c347b1a1308a4b880e7c5a06d8dfb4d507 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Sun, 5 Sep 2021 13:59:36 -0700 Subject: Make all non-user-creatable structures non-comparable (#802) This change makes all non-user-creatable structures non-comparable. This makes it easier to add changes later that don't introduce breaking changes from the go compatibility guarantees perspective. This, of course, implies that this change _is_ a breaking change, but since these structures are not intended to be created by users (or de-referenced), it should be okay. --- blob.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'blob.go') diff --git a/blob.go b/blob.go index 091ced1..fa4b1d3 100644 --- a/blob.go +++ b/blob.go @@ -15,6 +15,7 @@ import ( ) type Blob struct { + doNotCompare Object cast_ptr *C.git_blob } @@ -96,6 +97,7 @@ func (repo *Repository) CreateFromStream(hintPath string) (*BlobWriteStream, err } type BlobWriteStream struct { + doNotCompare ptr *C.git_writestream repo *Repository } -- cgit v1.2.3