]> git.ipfire.org Git - thirdparty/git.git/commit - setup.c
setup: unify repository version callbacks
authorJeff King <peff@peff.net>
Fri, 11 Mar 2016 22:37:14 +0000 (17:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Mar 2016 23:02:23 +0000 (15:02 -0800)
commit652f18ee8734ffb4a98271e5020dfa550db0f37b
tree41ab2d1feb7931e2a4ef64a1f56ce89bba6d359d
parent94ce167249781d2c80ba28412d853c426d41a55a
setup: unify repository version callbacks

Once upon a time, check_repository_format_gently would parse
the config with a single callback, and that callback would
set up a bunch of global variables. But now that we have
separate workdirs, we have to be more careful. Commit
31e26eb (setup.c: support multi-checkout repo setup,
2014-11-30) introduced a reduced callback which omits some
values like core.worktree. In the "main" callback we call
the reduced one, and then add back in the missing variables.

Now that we have split the config-parsing from the munging
of the global variables, we can do it all with a single
callback, and keep all of the "are we in a separate workdir"
logic together.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
setup.c