diff options
Diffstat (limited to 'object-file.c')
| -rw-r--r-- | object-file.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/object-file.c b/object-file.c index a6574b265d..af18e38527 100644 --- a/object-file.c +++ b/object-file.c @@ -7,7 +7,13 @@ * creation etc. */ #include "cache.h" +#include "abspath.h" +#include "alloc.h" #include "config.h" +#include "convert.h" +#include "environment.h" +#include "gettext.h" +#include "hex.h" #include "string-list.h" #include "lockfile.h" #include "delta.h" @@ -30,10 +36,13 @@ #include "mergesort.h" #include "quote.h" #include "packfile.h" +#include "object-file.h" #include "object-store.h" #include "promisor-remote.h" +#include "setup.h" #include "submodule.h" #include "fsck.h" +#include "wrapper.h" /* The maximum size for an object header. */ #define MAX_HEADER_LEN 32 @@ -267,7 +276,7 @@ int hash_algo_by_length(int len) /* * This is meant to hold a *small* number of objects that you would - * want read_object_file() to be able to return, but yet you do not want + * want repo_read_object_file() to be able to return, but yet you do not want * to write them into the object store (e.g. a browse-only * application). */ @@ -1684,7 +1693,7 @@ int pretend_object_file(void *buf, unsigned long len, enum object_type type, struct cached_object *co; hash_object_file(the_hash_algo, buf, len, type, oid); - if (has_object_file_with_flags(oid, OBJECT_INFO_QUICK | OBJECT_INFO_SKIP_FETCH_OBJECT) || + if (repo_has_object_file_with_flags(the_repository, oid, OBJECT_INFO_QUICK | OBJECT_INFO_SKIP_FETCH_OBJECT) || find_cached_object(oid)) return 0; ALLOC_GROW(cached_objects, cached_object_nr + 1, cached_object_alloc); @@ -2650,7 +2659,8 @@ int for_each_loose_object(each_loose_object_fn cb, void *data, return 0; } -static int append_loose_object(const struct object_id *oid, const char *path, +static int append_loose_object(const struct object_id *oid, + const char *path UNUSED, void *data) { oidtree_insert(data, oid); |
