summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-10 23:09:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-13 20:48:25 (GMT)
commita7ff6f5a0f310406aa4973e8d7ec25815554bcb5 (patch)
tree6b2a61709b419a609a6be78e84584ad26991e55e /sha1-file.c
parent202e7f1e161b5bce6587d1a696843ead10a8b477 (diff)
downloadgit-a7ff6f5a0f310406aa4973e8d7ec25815554bcb5.zip
git-a7ff6f5a0f310406aa4973e8d7ec25815554bcb5.tar.gz
git-a7ff6f5a0f310406aa4973e8d7ec25815554bcb5.tar.bz2
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 'sha1-file.c')
-rw-r--r--sha1-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1-file.c b/sha1-file.c
index dfa8a35..cc0b57a 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -2146,7 +2146,8 @@ static int loose_from_alt_odb(struct alternate_object_database *alt,
return r;
}
-int for_each_loose_object(each_loose_object_fn cb, void *data, unsigned flags)
+int for_each_loose_object(each_loose_object_fn cb, void *data,
+ enum for_each_object_flags flags)
{
struct loose_alt_odb_data alt;
int r;