summaryrefslogtreecommitdiff
path: root/builtin/prune.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 02:27:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-14 16:23:49 (GMT)
commitabef9020e3df87c441c9a3a95f592fce5fa49bb9 (patch)
treeb04714a271049de3d7402e20e868beb5cee30995 /builtin/prune.c
parent7984f23833d1c1b8d7d5d863ed8c42b67e0a0fba (diff)
downloadgit-abef9020e3df87c441c9a3a95f592fce5fa49bb9.zip
git-abef9020e3df87c441c9a3a95f592fce5fa49bb9.tar.gz
git-abef9020e3df87c441c9a3a95f592fce5fa49bb9.tar.bz2
sha1_file: convert sha1_object_info* to object_id
Convert sha1_object_info and sha1_object_info_extended to take pointers to struct object_id and rename them to use "oid" instead of "sha1" in their names. Update the declaration and definition and apply the following semantic patch, plus the standard object_id transforms: @@ expression E1, E2; @@ - sha1_object_info(E1.hash, E2) + oid_object_info(&E1, E2) @@ expression E1, E2; @@ - sha1_object_info(E1->hash, E2) + oid_object_info(E1, E2) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1.hash, E2, E3) + oid_object_info_extended(&E1, E2, E3) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1->hash, E2, E3) + oid_object_info_extended(E1, E2, E3) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/prune.c')
-rw-r--r--builtin/prune.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 4394d01..38ced18 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -50,7 +50,7 @@ static int prune_object(const struct object_id *oid, const char *fullpath,
if (st.st_mtime > expire)
return 0;
if (show_only || verbose) {
- enum object_type type = sha1_object_info(oid->hash, NULL);
+ enum object_type type = oid_object_info(oid, NULL);
printf("%s %s\n", oid_to_hex(oid),
(type > 0) ? type_name(type) : "unknown");
}