summaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-08-10 19:09:44 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-13 13:48:25 -0700
commita7ff6f5a0f310406aa4973e8d7ec25815554bcb5 (patch)
tree6b2a61709b419a609a6be78e84584ad26991e55e /packfile.c
parentfor_each_*_object: store flag definitions in a single location (diff)
downloadtgif-a7ff6f5a0f310406aa4973e8d7ec25815554bcb5.tar.xz
for_each_*_object: take flag arguments as enum
It's not wrong to pass our flags in an "unsigned", as we know it will be at least as large as the enum. However, using the enum in the declaration makes it more obvious where to find the list of flags. While we're here, let's also drop the "extern" noise-words from the declarations, per our modern coding style. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c
index 6974903e58..9da8f6d728 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1904,7 +1904,8 @@ int for_each_object_in_pack(struct packed_git *p, each_packed_object_fn cb, void
return r;
}
-int for_each_packed_object(each_packed_object_fn cb, void *data, unsigned flags)
+int for_each_packed_object(each_packed_object_fn cb, void *data,
+ enum for_each_object_flags flags)
{
struct packed_git *p;
int r = 0;