MCPcopy
hub / github.com/go-git/go-git / Write

Method Write

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

Source from the content-addressed store, hash-verified

1084}
1085
1086func (b *indexBuilder) Write(idx *index.Index) {
1087 idx.Entries = idx.Entries[:0]
1088 for _, e := range b.entries {
1089 idx.Entries = append(idx.Entries, e)
1090 }
1091}
1092
1093func (b *indexBuilder) Add(e *index.Entry) {
1094 b.entries[e.Name] = e

Callers 15

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

Calls

no outgoing calls

Tested by 12

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