diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-03-28 13:15:48 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-29 02:03:10 (GMT) |
commit | c15087d17bd3c146696bfe6abf86322d79bf61ca (patch) | |
tree | 9425978e45e7a3268d93289ec5c504905323bd5c /fetch-pack.c | |
parent | 53692df2b82f9d5ce15779da7d5227f1b027e193 (diff) | |
download | git-c15087d17bd3c146696bfe6abf86322d79bf61ca.zip git-c15087d17bd3c146696bfe6abf86322d79bf61ca.tar.gz git-c15087d17bd3c146696bfe6abf86322d79bf61ca.tar.bz2 |
fsck.c: move gitmodules_{found,done} into fsck_options
Move the gitmodules_{found,done} static variables added in
159e7b080bf (fsck: detect gitmodules files, 2018-05-02) into the
fsck_options struct. It makes sense to keep all the context in the
same place.
This requires changing the recently added register_found_gitmodules()
function added in 5476e1efde (fetch-pack: print and use dangling
.gitmodules, 2021-02-22) to take fsck_options. That function will be
removed in a subsequent commit, but as it'll require the new
gitmodules_found attribute of "fsck_options" we need this intermediate
step first.
An earlier version of this patch removed the small amount of
duplication we now have between FSCK_OPTIONS_{DEFAULT,STRICT} with a
FSCK_OPTIONS_COMMON macro. I don't think such de-duplication is worth
it for this amount of copy/pasting.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 6a61a46..82c3c2c 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -998,7 +998,7 @@ static void fsck_gitmodules_oids(struct oidset *gitmodules_oids) oidset_iter_init(gitmodules_oids, &iter); while ((oid = oidset_iter_next(&iter))) - register_found_gitmodules(oid); + register_found_gitmodules(&fo, oid); if (fsck_finish(&fo)) die("fsck failed"); } |