| Johannes Schindelin | 752c0c2 | 2009-10-19 12:38:32 | [diff] [blame] | 1 | #ifndef SUBMODULE_H |
| 2 | #define SUBMODULE_H |
| 3 | |
| Jens Lehmann | 46a958b | 2010-06-25 14:56:47 | [diff] [blame] | 4 | struct diff_options; |
| Jens Lehmann | 50d89ad | 2012-09-01 15:27:06 | [diff] [blame] | 5 | struct argv_array; |
| Jens Lehmann | 46a958b | 2010-06-25 14:56:47 | [diff] [blame] | 6 | |
| Jens Lehmann | 88a2197 | 2011-03-06 22:10:46 | [diff] [blame] | 7 | enum { |
| Mike Crowe | b33a15b | 2015-11-17 11:05:56 | [diff] [blame] | 8 | RECURSE_SUBMODULES_CHECK = -4, |
| Heiko Voigt | 027771f | 2015-08-18 00:22:00 | [diff] [blame] | 9 | RECURSE_SUBMODULES_ERROR = -3, |
| Heiko Voigt | 959b545 | 2015-08-18 00:21:57 | [diff] [blame] | 10 | RECURSE_SUBMODULES_NONE = -2, |
| Jens Lehmann | 88a2197 | 2011-03-06 22:10:46 | [diff] [blame] | 11 | RECURSE_SUBMODULES_ON_DEMAND = -1, |
| 12 | RECURSE_SUBMODULES_OFF = 0, |
| 13 | RECURSE_SUBMODULES_DEFAULT = 1, |
| 14 | RECURSE_SUBMODULES_ON = 2 |
| 15 | }; |
| 16 | |
| Jens Lehmann | 5fee995 | 2013-07-30 19:50:34 | [diff] [blame] | 17 | int is_staging_gitmodules_ok(void); |
| Jens Lehmann | 0656781 | 2013-08-06 19:15:11 | [diff] [blame] | 18 | int update_path_in_gitmodules(const char *oldpath, const char *newpath); |
| Jens Lehmann | 95c1641 | 2013-08-06 19:15:25 | [diff] [blame] | 19 | int remove_path_from_gitmodules(const char *path); |
| Jens Lehmann | 5fee995 | 2013-07-30 19:50:34 | [diff] [blame] | 20 | void stage_updated_gitmodules(void); |
| Jens Lehmann | aee9c7d | 2010-08-05 22:39:25 | [diff] [blame] | 21 | void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, |
| 22 | const char *path); |
| Jens Lehmann | 7dce19d | 2010-11-12 12:54:52 | [diff] [blame] | 23 | int submodule_config(const char *var, const char *value, void *cb); |
| René Scharfe | c2df758 | 2012-04-10 19:10:26 | [diff] [blame] | 24 | void gitmodules_config(void); |
| Jens Lehmann | 46a958b | 2010-06-25 14:56:47 | [diff] [blame] | 25 | void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *); |
| Johannes Schindelin | 752c0c2 | 2009-10-19 12:38:32 | [diff] [blame] | 26 | void show_submodule_summary(FILE *f, const char *path, |
| John Keeping | 0f33a06 | 2013-04-05 16:12:08 | [diff] [blame] | 27 | const char *line_prefix, |
| Johannes Schindelin | 752c0c2 | 2009-10-19 12:38:32 | [diff] [blame] | 28 | unsigned char one[20], unsigned char two[20], |
| Ramkumar Ramachandra | 4e21513 | 2012-11-13 15:42:47 | [diff] [blame] | 29 | unsigned dirty_submodule, const char *meta, |
| Johannes Schindelin | 752c0c2 | 2009-10-19 12:38:32 | [diff] [blame] | 30 | const char *del, const char *add, const char *reset); |
| Jens Lehmann | be254a0 | 2010-11-10 23:55:02 | [diff] [blame] | 31 | void set_config_fetch_recurse_submodules(int value); |
| Jens Lehmann | 88a2197 | 2011-03-06 22:10:46 | [diff] [blame] | 32 | void check_for_new_submodule_commits(unsigned char new_sha1[20]); |
| Jens Lehmann | 50d89ad | 2012-09-01 15:27:06 | [diff] [blame] | 33 | int fetch_populated_submodules(const struct argv_array *options, |
| Jens Lehmann | 8f0700d | 2011-03-06 22:11:21 | [diff] [blame] | 34 | const char *prefix, int command_line_option, |
| Jens Lehmann | be254a0 | 2010-11-10 23:55:02 | [diff] [blame] | 35 | int quiet); |
| Jens Lehmann | 3bfc450 | 2010-03-13 22:00:27 | [diff] [blame] | 36 | unsigned is_submodule_modified(const char *path, int ignore_untracked); |
| Jens Lehmann | 293ab15 | 2012-09-26 18:21:13 | [diff] [blame] | 37 | int submodule_uses_gitfile(const char *path); |
| 38 | int ok_to_remove_submodule(const char *path); |
| Heiko Voigt | 68d03e4 | 2010-07-07 13:39:13 | [diff] [blame] | 39 | int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20], |
| Brad King | 8098878 | 2011-10-13 12:59:05 | [diff] [blame] | 40 | const unsigned char a[20], const unsigned char b[20], int search); |
| Heiko Voigt | a762e51 | 2012-03-29 07:21:23 | [diff] [blame] | 41 | int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name, |
| 42 | struct string_list *needs_pushing); |
| Heiko Voigt | eb21c73 | 2012-03-29 07:21:24 | [diff] [blame] | 43 | int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name); |
| Jens Lehmann | a88c915 | 2013-07-30 19:50:03 | [diff] [blame] | 44 | void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir); |
| Johannes Schindelin | 752c0c2 | 2009-10-19 12:38:32 | [diff] [blame] | 45 | |
| 46 | #endif |