diff options
author | Elijah Newren <newren@gmail.com> | 2023-05-16 06:33:42 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-21 11:14:34 -0700 |
commit | c2f76965d0202a894c9491e0647b7834b58cd168 (patch) | |
tree | 09c5d3e31213d73b66056857f13b0c49f3c31fec /builtin/commit.c | |
parent | 0f7443bdc7284ad36e5d0cd8b2526e2123b8aa4f (diff) |
init-db: remove unnecessary global variable
This commit was prompted by a desire to move the functions which
builtin/init-db.c and builtin/clone.c share out of the former file and
into setup.c. One issue that made it difficult was the
init_is_bare_repository global variable.
init_is_bare_repository's sole use in life it to cache a value in
init_db(), and then be used in create_default_files(). This is a bit
odd since init_db() directly calls create_default_files(), and is the
only caller of that function. Convert the global to a simple function
parameter instead.
(Of course, this doesn't fix the fact that this value is then ignored by
create_default_files(), as noted in a big TODO comment in that function,
but it at least includes no behavioral change other than getting rid of
a very questionable global variable.)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions