From d850b7a545fcfbd97460a921c7f7c59d933eb0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:46 +0200 Subject: cocci: apply the "cache.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "cache.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/unpack-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/unpack-file.c') diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c index 88de32b7d7..e0d5178acc 100644 --- a/builtin/unpack-file.c +++ b/builtin/unpack-file.c @@ -29,7 +29,7 @@ int cmd_unpack_file(int argc, const char **argv, const char *prefix) if (argc != 2 || !strcmp(argv[1], "-h")) usage("git unpack-file "); - if (get_oid(argv[1], &oid)) + if (repo_get_oid(the_repository, argv[1], &oid)) die("Not a valid object name %s", argv[1]); git_config(git_default_config, NULL); -- cgit v1.2.3 From bc726bd075929aab6b3e09d4dd5c2b0726fd5350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:50 +0200 Subject: cocci: apply the "object-store.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "object-store.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/unpack-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/unpack-file.c') diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c index e0d5178acc..9d5c152419 100644 --- a/builtin/unpack-file.c +++ b/builtin/unpack-file.c @@ -10,7 +10,7 @@ static char *create_temp_file(struct object_id *oid) unsigned long size; int fd; - buf = read_object_file(oid, &type, &size); + buf = repo_read_object_file(the_repository, oid, &type, &size); if (!buf || type != OBJ_BLOB) die("unable to read blob object %s", oid_to_hex(oid)); -- cgit v1.2.3