mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
repack: move 'delta_base_offset' to 'struct pack_objects_args'
The static variable 'delta_base_offset' determines whether or not we pass the "--delta-base-offset" command-line argument when spawning pack-objects as a child process. Its introduction dates back to when repack was rewritten in C, all the way back ina1bbc6c017(repack: rewrite the shell script in C, 2013-09-15). 'struct pack_objects_args' was introduced much later on in4571324b99(builtin/repack.c: allow configuring cruft pack generation, 2022-05-20), but did not move the 'delta_base_offset' variable. Since the 'delta_base_offset' is a property of an individual pack-objects command, re-introduce that variable as a member of 'struct pack_objects_args', which will enable further code movement in the subsequent commits. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
19f6e8d023
commit
e35ef71e00
3
repack.h
3
repack.h
@@ -15,9 +15,12 @@ struct pack_objects_args {
|
||||
int local;
|
||||
int name_hash_version;
|
||||
int path_walk;
|
||||
int delta_base_offset;
|
||||
struct list_objects_filter_options filter_options;
|
||||
};
|
||||
|
||||
#define PACK_OBJECTS_ARGS_INIT { .delta_base_offset = 1 }
|
||||
|
||||
void pack_objects_args_release(struct pack_objects_args *args);
|
||||
|
||||
#endif /* REPACK_H */
|
||||
|
||||
Reference in New Issue
Block a user