MCPcopy Index your code
hub / github.com/driusan/dgit / AddFile

Method AddFile

git/index.go:504–561  ·  view source on GitHub ↗

Adds a file to the index, without writing it to disk. To write it to disk after calling this, use GitIndex.WriteIndex This will do the following: 1. write git object blob of file contents to .git/objects 2. normalize os.File name to path relative to gitRoot 3. search GitIndex for normalized name i

(c *Client, file File, opts UpdateIndexOptions)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

UpdateIndexFunction · 0.80

Calls 8

AddStageMethod · 0.95
IndexPathMethod · 0.80
LstatMethod · 0.80
IsDirMethod · 0.80
IsSymlinkMethod · 0.80
WriteObjectMethod · 0.80
ReadFileMethod · 0.80
MTimeMethod · 0.45

Tested by

no test coverage detected