MCPcopy Index your code
hub / github.com/git/git / index_pipe

Function index_pipe

object-file.c:1053–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1051}
1052
1053static int index_pipe(struct index_state *istate, struct object_id *oid,
1054 int fd, enum object_type type,
1055 const char *path, unsigned flags)
1056{
1057 struct strbuf sbuf = STRBUF_INIT;
1058 int ret;
1059
1060 if (strbuf_read(&sbuf, fd, 4096) >= 0)
1061 ret = index_mem(istate, oid, sbuf.buf, sbuf.len, type, path, flags);
1062 else
1063 ret = -1;
1064 strbuf_release(&sbuf);
1065 return ret;
1066}
1067
1068#define SMALL_FILE_SIZE (32*1024)
1069

Callers 1

index_fdFunction · 0.85

Calls 3

strbuf_readFunction · 0.85
index_memFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected