summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2026-08-11 10:33:10 +0200
committerJunio C Hamano <gitster@pobox.com>2026-08-11 07:33:17 -0700
commitee996af567434d3fc5204ab8f53a0ade5803303d (patch)
tree2eba87d67238d2a81ebe1c81d05dfc5026f4eba7 /contrib/persistent-https
parent417afb2b4d2d2c02121300d64e874cb97e23531c (diff)
fast-import: move command state globals into 'struct fast_import_state'
A previous commit introduced 'struct fast_import_state' to hold some command state, and reduce the need for global variables. Let's continue in the same direction and move two more global variables that describe the command state into it: 'seen_data_command' and 'allow_unsafe_features'. All the sites accessing these variables are already in functions that receive the 'state' parameter (or in cmd_fast_import() which owns the struct), so no additional threading is needed. As 'state->allow_unsafe_features' is now dereferenced in check_unsafe_feature(), its 'state' parameter is no longer unused, so the UNUSED marker is removed. The fast_import_state_init() call is moved up before the early command-line scan for '--allow-unsafe-features', so that this option can be recorded directly into the struct without being clobbered by the memset() in fast_import_state_init(). This is a mechanical refactoring with no intended behavior change. Signed-off-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions