MCPcopy Create free account
hub / github.com/libgit2/git2go / populateCIndexEntry

Function populateCIndexEntry

index.go:91–104  ·  view source on GitHub ↗
(source *IndexEntry, dest *C.git_index_entry)

Source from the content-addressed store, hash-verified

89}
90
91func populateCIndexEntry(source *IndexEntry, dest *C.git_index_entry) {
92 dest.ctime.seconds = C.int32_t(source.Ctime.Seconds)
93 dest.ctime.nanoseconds = C.uint32_t(source.Ctime.Nanoseconds)
94 dest.mtime.seconds = C.int32_t(source.Mtime.Seconds)
95 dest.mtime.nanoseconds = C.uint32_t(source.Mtime.Nanoseconds)
96 dest.mode = C.uint32_t(source.Mode)
97 dest.uid = C.uint32_t(source.Uid)
98 dest.gid = C.uint32_t(source.Gid)
99 dest.file_size = C.uint32_t(source.Size)
100 if source.Id != nil {
101 dest.id = *source.Id.toC()
102 }
103 dest.path = C.CString(source.Path)
104}
105
106func freeCIndexEntry(entry *C.git_index_entry) {
107 C.free(unsafe.Pointer(entry.path))

Callers 3

AddMethod · 0.85
AddFromBufferMethod · 0.85
AddConflictMethod · 0.85

Calls 1

toCMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…