diff options
author | shejialuo <shejialuo@gmail.com> | 2024-08-08 13:24:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 18:36:52 +0200 |
commit | 2d79aa9095577bdc2049cfa938d18d3ebed5349f (patch) | |
tree | a36790006c153c3a3f56bab42a731ea634ec7998 /fsck.c | |
parent | Git 2.46 (diff) | |
download | git-2d79aa9095577bdc2049cfa938d18d3ebed5349f.tar.xz git-2d79aa9095577bdc2049cfa938d18d3ebed5349f.zip |
fsck: rename "skiplist" to "skip_oids"
The "skiplist" field in "fsck_options" is related to objects. Because we
are going to introduce ref consistency check, the "skiplist" name is too
general which will make the caller think "skiplist" is related to both
the refs and objects.
It may seem that for both refs and objects, we should provide a general
"skiplist" here. However, the type for "skiplist" is `struct oidset`
which is totally unsuitable for refs.
To avoid above ambiguity, rename "skiplist" to "skip_oids".
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -205,7 +205,7 @@ void fsck_set_msg_types(struct fsck_options *options, const char *values) if (!strcmp(buf, "skiplist")) { if (equal == len) die("skiplist requires a path"); - oidset_parse_file(&options->skiplist, buf + equal + 1, + oidset_parse_file(&options->skip_oids, buf + equal + 1, the_repository->hash_algo); buf += len + 1; continue; @@ -223,7 +223,7 @@ void fsck_set_msg_types(struct fsck_options *options, const char *values) static int object_on_skiplist(struct fsck_options *opts, const struct object_id *oid) { - return opts && oid && oidset_contains(&opts->skiplist, oid); + return opts && oid && oidset_contains(&opts->skip_oids, oid); } __attribute__((format (printf, 5, 6))) |