Commit Diff


commit - 3eb93f3c8683453016417c3a4a8a989c7afadcdb
commit + 90bdb554ae5fcbb3f8bfd26f70ed3f540d77c9bd
blob - ef0808bbfa922701a5c6a508b0dc508653a80113
blob + f0d9f81873ca7c0897120083789fce73b1b37638
--- lib/got_lib_object.h
+++ lib/got_lib_object.h
@@ -92,6 +92,8 @@ struct got_tag_object {
 
 struct got_object_id *got_object_get_id(struct got_object *);
 const struct got_error *got_object_get_id_str(char **, struct got_object *);
+const struct got_error *got_object_get_path(char **, struct got_object_id *,
+    struct got_repository *);
 const struct got_error *got_object_open(struct got_object **,
     struct got_repository *, struct got_object_id *);
 const struct got_error *got_object_open_by_id_str(struct got_object **,
blob - 0c852561674c41c108485284102bd0b661bd81fe
blob + 96343bed081edc52541ab337665a7d2e1ba37286
--- lib/object.c
+++ lib/object.c
@@ -107,8 +107,9 @@ got_object_get_type(int *type, struct got_repository *
 	return err;
 }
 
-static const struct got_error *
-object_path(char **path, struct got_object_id *id, struct got_repository *repo)
+const struct got_error *
+got_object_get_path(char **path, struct got_object_id *id,
+    struct got_repository *repo)
 {
 	const struct got_error *err = NULL;
 	char *hex = NULL;
@@ -140,7 +141,7 @@ open_loose_object(int *fd, struct got_object_id *id,
 	const struct got_error *err = NULL;
 	char *path;
 
-	err = object_path(&path, id, repo);
+	err = got_object_get_path(&path, id, repo);
 	if (err)
 		return err;
 	*fd = open(path, O_RDONLY | O_NOFOLLOW);
@@ -418,7 +419,7 @@ got_object_open(struct got_object **obj, struct got_re
 		return got_repo_cache_object(repo, id, *obj);
 	}
 
-	err = object_path(&path, id, repo);
+	err = got_object_get_path(&path, id, repo);
 	if (err)
 		return err;