| 1051 | } |
| 1052 | |
| 1053 | static 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 |
no test coverage detected