MCPcopy Create free account
hub / github.com/go-git/go-git / Write

Method Write

worktree.go:1113–1118  ·  view source on GitHub ↗
(idx *index.Index)

Source from the content-addressed store, hash-verified

1111}
1112
1113func (b *indexBuilder) Write(idx *index.Index) {
1114 idx.Entries = idx.Entries[:0]
1115 for _, e := range b.entries {
1116 idx.Entries = append(idx.Entries, e)
1117 }
1118}
1119
1120func (b *indexBuilder) Add(e *index.Entry) {
1121 b.entries[e.Name] = e

Callers 12

createCommitFunction · 0.45
CommitNewFileFunction · 0.45
resetIndexMethod · 0.45
resetWorktreeMethod · 0.45
checkoutFileSymlinkMethod · 0.45
TestCheckoutKeepMethod · 0.45
TestResetMergeMethod · 0.45
TestResetHardMethod · 0.45
TestStatusModifiedMethod · 0.45
TestStatusIgnoredMethod · 0.45

Calls

no outgoing calls

Tested by 8

createCommitFunction · 0.36
CommitNewFileFunction · 0.36
TestCheckoutKeepMethod · 0.36
TestResetMergeMethod · 0.36
TestResetHardMethod · 0.36
TestStatusModifiedMethod · 0.36
TestStatusIgnoredMethod · 0.36