]> git.ipfire.org Git - thirdparty/git.git/commit
clone: cut down on global variables in clone.c
authorToon Claes <toon@iotcl.com>
Thu, 6 Feb 2025 06:33:29 +0000 (07:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Feb 2025 20:23:53 +0000 (12:23 -0800)
commit7f420a6bda9704684ccc924070e8404dac55ffdf
treec5da7131771a9966464de8f937973628b92efca2
parent58b5801aa94ad5031978f8e42c1be1230b3d352f
clone: cut down on global variables in clone.c

In clone.c the `struct option` which is used to parse the input options
for git-clone(1) is a global variable. Due to this, many variables that
are used to parse the value into, are also global.

Make `builtin_clone_options` a local variable in cmd_clone() and carry
along all variables that are only used in that function.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c