2009-10-19 20:38:32 +08:00
|
|
|
#ifndef SUBMODULE_H
|
|
|
|
#define SUBMODULE_H
|
|
|
|
|
2010-06-25 22:56:47 +08:00
|
|
|
struct diff_options;
|
2012-09-01 23:27:06 +08:00
|
|
|
struct argv_array;
|
2010-06-25 22:56:47 +08:00
|
|
|
|
2011-03-07 06:10:46 +08:00
|
|
|
enum {
|
2015-11-17 19:05:56 +08:00
|
|
|
RECURSE_SUBMODULES_CHECK = -4,
|
2015-08-18 08:22:00 +08:00
|
|
|
RECURSE_SUBMODULES_ERROR = -3,
|
2015-08-18 08:21:57 +08:00
|
|
|
RECURSE_SUBMODULES_NONE = -2,
|
2011-03-07 06:10:46 +08:00
|
|
|
RECURSE_SUBMODULES_ON_DEMAND = -1,
|
|
|
|
RECURSE_SUBMODULES_OFF = 0,
|
|
|
|
RECURSE_SUBMODULES_DEFAULT = 1,
|
|
|
|
RECURSE_SUBMODULES_ON = 2
|
|
|
|
};
|
|
|
|
|
2013-07-31 03:50:34 +08:00
|
|
|
int is_staging_gitmodules_ok(void);
|
2013-08-07 03:15:11 +08:00
|
|
|
int update_path_in_gitmodules(const char *oldpath, const char *newpath);
|
2013-08-07 03:15:25 +08:00
|
|
|
int remove_path_from_gitmodules(const char *path);
|
2013-07-31 03:50:34 +08:00
|
|
|
void stage_updated_gitmodules(void);
|
2010-08-06 06:39:25 +08:00
|
|
|
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
|
|
|
|
const char *path);
|
2010-11-12 20:54:52 +08:00
|
|
|
int submodule_config(const char *var, const char *value, void *cb);
|
2012-04-11 03:10:26 +08:00
|
|
|
void gitmodules_config(void);
|
2010-06-25 22:56:47 +08:00
|
|
|
void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *);
|
2009-10-19 20:38:32 +08:00
|
|
|
void show_submodule_summary(FILE *f, const char *path,
|
2013-04-06 00:12:08 +08:00
|
|
|
const char *line_prefix,
|
2009-10-19 20:38:32 +08:00
|
|
|
unsigned char one[20], unsigned char two[20],
|
2012-11-13 23:42:47 +08:00
|
|
|
unsigned dirty_submodule, const char *meta,
|
2009-10-19 20:38:32 +08:00
|
|
|
const char *del, const char *add, const char *reset);
|
2010-11-11 07:55:02 +08:00
|
|
|
void set_config_fetch_recurse_submodules(int value);
|
2011-03-07 06:10:46 +08:00
|
|
|
void check_for_new_submodule_commits(unsigned char new_sha1[20]);
|
2012-09-01 23:27:06 +08:00
|
|
|
int fetch_populated_submodules(const struct argv_array *options,
|
2011-03-07 06:11:21 +08:00
|
|
|
const char *prefix, int command_line_option,
|
2015-12-16 08:04:12 +08:00
|
|
|
int quiet, int max_parallel_jobs);
|
2010-03-14 06:00:27 +08:00
|
|
|
unsigned is_submodule_modified(const char *path, int ignore_untracked);
|
2012-09-27 02:21:13 +08:00
|
|
|
int submodule_uses_gitfile(const char *path);
|
|
|
|
int ok_to_remove_submodule(const char *path);
|
2010-07-07 21:39:13 +08:00
|
|
|
int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20],
|
2011-10-13 20:59:05 +08:00
|
|
|
const unsigned char a[20], const unsigned char b[20], int search);
|
2012-03-29 15:21:23 +08:00
|
|
|
int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,
|
|
|
|
struct string_list *needs_pushing);
|
2012-03-29 15:21:24 +08:00
|
|
|
int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name);
|
2013-07-31 03:50:03 +08:00
|
|
|
void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
|
2009-10-19 20:38:32 +08:00
|
|
|
|
|
|
|
#endif
|