return 0;
}
-int odb_source_loose_read_object_info(struct odb_source *source,
+static int read_object_info_from_path(struct odb_source *source,
+ const char *path,
const struct object_id *oid,
struct object_info *oi,
- unsigned flags)
+ enum object_info_flags flags)
{
int ret;
int fd;
return ret;
}
- unsigned flags)
+int odb_source_loose_read_object_info(struct odb_source *source,
+ const struct object_id *oid,
+ struct object_info *oi,
++ enum object_info_flags flags)
+{
+ static struct strbuf buf = STRBUF_INIT;
+ odb_loose_path(source, &buf, oid);
+ return read_object_info_from_path(source, buf.buf, oid, oi, flags);
+}
+
static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_ctx *c,
const void *buf, unsigned long len,
struct object_id *oid,