submodule-config: keep update strategy around
Currently submodule.<name>.update is only handled by git-submodule.sh. C code will start to need to make use of that value as more of the functionality of git-submodule.sh moves into library code in C. Add the update field to 'struct submodule' and populate it so it can be read as sm->update or from sm->update_command. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2a73b3dad0
commit
ea2fa5a338
16
submodule.h
16
submodule.h
@ -13,6 +13,20 @@ enum {
|
||||
RECURSE_SUBMODULES_ON = 2
|
||||
};
|
||||
|
||||
enum submodule_update_type {
|
||||
SM_UPDATE_UNSPECIFIED = 0,
|
||||
SM_UPDATE_CHECKOUT,
|
||||
SM_UPDATE_REBASE,
|
||||
SM_UPDATE_MERGE,
|
||||
SM_UPDATE_NONE,
|
||||
SM_UPDATE_COMMAND
|
||||
};
|
||||
|
||||
struct submodule_update_strategy {
|
||||
enum submodule_update_type type;
|
||||
const char *command;
|
||||
};
|
||||
|
||||
int is_staging_gitmodules_ok(void);
|
||||
int update_path_in_gitmodules(const char *oldpath, const char *newpath);
|
||||
int remove_path_from_gitmodules(const char *path);
|
||||
@ -21,6 +35,8 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
|
||||
const char *path);
|
||||
int submodule_config(const char *var, const char *value, void *cb);
|
||||
void gitmodules_config(void);
|
||||
int parse_submodule_update_strategy(const char *value,
|
||||
struct submodule_update_strategy *dst);
|
||||
void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *);
|
||||
void show_submodule_summary(FILE *f, const char *path,
|
||||
const char *line_prefix,
|
||||
|
Reference in New Issue
Block a user