MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / DiffIndexWithPaths

Function DiffIndexWithPaths

git/git.go:269–284  ·  view source on GitHub ↗
(ref string, cached bool, paths []string)

Source from the content-addressed store, hash-verified

267}
268
269func DiffIndexWithPaths(ref string, cached bool, paths []string) (string, error) {
270 args := []string{"diff-index"}
271 if cached {
272 args = append(args, "--cached")
273 }
274 args = append(args, ref)
275 args = append(args, "--")
276 args = append(args, paths...)
277
278 output, err := gitSimple(args...)
279 if err != nil {
280 return "", err
281 }
282
283 return output, nil
284}
285
286func HashObject(r io.Reader) (string, error) {
287 cmd, err := gitNoLFS("hash-object", "--stdin")

Callers 1

RunMethod · 0.92

Calls 1

gitSimpleFunction · 0.85

Tested by

no test coverage detected