aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--builtin/pack-objects.c4
-rw-r--r--object-file.c6
-rw-r--r--object-file.h16
3 files changed, 13 insertions, 13 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index b5454e5df1..69e80b1443 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1716,7 +1716,7 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
*/
struct odb_source *source = the_repository->objects->sources->next;
for (; source; source = source->next)
- if (has_loose_object(source, oid))
+ if (odb_source_loose_has_object(source, oid))
return 0;
}
@@ -3978,7 +3978,7 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type
int found = 0;
for (; !found && source; source = source->next)
- if (has_loose_object(source, oid))
+ if (odb_source_loose_has_object(source, oid))
found = 1;
/*
diff --git a/object-file.c b/object-file.c
index 6d6e9a5a2a..79e7ab8d2e 100644
--- a/object-file.c
+++ b/object-file.c
@@ -99,8 +99,8 @@ static int check_and_freshen_source(struct odb_source *source,
return check_and_freshen_file(path.buf, freshen);
}
-int has_loose_object(struct odb_source *source,
- const struct object_id *oid)
+int odb_source_loose_has_object(struct odb_source *source,
+ const struct object_id *oid)
{
return check_and_freshen_source(source, oid, 0);
}
@@ -1161,7 +1161,7 @@ int force_object_loose(struct odb_source *source,
int ret;
for (struct odb_source *s = source->odb->sources; s; s = s->next)
- if (has_loose_object(s, oid))
+ if (odb_source_loose_has_object(s, oid))
return 0;
oi.typep = &type;
diff --git a/object-file.h b/object-file.h
index ca13d3d64e..065a44bb8a 100644
--- a/object-file.h
+++ b/object-file.h
@@ -52,6 +52,14 @@ void *odb_source_loose_map_object(struct odb_source *source,
unsigned long *size);
/*
+ * Return true iff an object database source has a loose object
+ * with the specified name. This function does not respect replace
+ * references.
+ */
+int odb_source_loose_has_object(struct odb_source *source,
+ const struct object_id *oid);
+
+/*
* Populate and return the loose object cache array corresponding to the
* given object ID.
*/
@@ -67,14 +75,6 @@ const char *odb_loose_path(struct odb_source *source,
const struct object_id *oid);
/*
- * Return true iff an object database source has a loose object
- * with the specified name. This function does not respect replace
- * references.
- */
-int has_loose_object(struct odb_source *source,
- const struct object_id *oid);
-
-/*
* Iterate over the files in the loose-object parts of the object
* directory "path", triggering the following callbacks:
*