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

Function newIndexEntryFromC

index.go:75–89  ·  view source on GitHub ↗
(entry *C.git_index_entry)

Source from the content-addressed store, hash-verified

73}
74
75func newIndexEntryFromC(entry *C.git_index_entry) *IndexEntry {
76 if entry == nil {
77 return nil
78 }
79 return &IndexEntry{
80 IndexTime{int32(entry.ctime.seconds), uint32(entry.ctime.nanoseconds)},
81 IndexTime{int32(entry.mtime.seconds), uint32(entry.mtime.nanoseconds)},
82 Filemode(entry.mode),
83 uint32(entry.uid),
84 uint32(entry.gid),
85 uint32(entry.file_size),
86 newOidFromC(&entry.id),
87 C.GoString(entry.path),
88 }
89}
90
91func populateCIndexEntry(source *IndexEntry, dest *C.git_index_entry) {
92 dest.ctime.seconds = C.int32_t(source.Ctime.Seconds)

Callers 4

EntryByIndexMethod · 0.85
EntryByPathMethod · 0.85
ConflictMethod · 0.85
NextMethod · 0.85

Calls 2

FilemodeTypeAlias · 0.85
newOidFromCFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…