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

Function statusEntryFromC

status.go:38–55  ·  view source on GitHub ↗
(statusEntry *C.git_status_entry)

Source from the content-addressed store, hash-verified

36}
37
38func statusEntryFromC(statusEntry *C.git_status_entry) StatusEntry {
39 var headToIndex DiffDelta = DiffDelta{}
40 var indexToWorkdir DiffDelta = DiffDelta{}
41
42 // Based on the libgit2 status example, head_to_index can be null in some cases
43 if statusEntry.head_to_index != nil {
44 headToIndex = diffDeltaFromC(statusEntry.head_to_index)
45 }
46 if statusEntry.index_to_workdir != nil {
47 indexToWorkdir = diffDeltaFromC(statusEntry.index_to_workdir)
48 }
49
50 return StatusEntry{
51 Status: Status(statusEntry.status),
52 HeadToIndex: headToIndex,
53 IndexToWorkdir: indexToWorkdir,
54 }
55}
56
57type StatusList struct {
58 doNotCompare

Callers 1

ByIndexMethod · 0.85

Calls 2

diffDeltaFromCFunction · 0.85
StatusTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…