Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 1 | #ifndef SUBMODULE_H |
| 2 | #define SUBMODULE_H |
| 3 | |
Jens Lehmann | 46a958b | 2010-06-25 16:56:47 +0200 | [diff] [blame] | 4 | struct diff_options; |
Jens Lehmann | 50d89ad | 2012-09-01 17:27:06 +0200 | [diff] [blame] | 5 | struct argv_array; |
Jens Lehmann | 46a958b | 2010-06-25 16:56:47 +0200 | [diff] [blame] | 6 | |
Jens Lehmann | 88a2197 | 2011-03-06 23:10:46 +0100 | [diff] [blame] | 7 | enum { |
| 8 | RECURSE_SUBMODULES_ON_DEMAND = -1, |
| 9 | RECURSE_SUBMODULES_OFF = 0, |
| 10 | RECURSE_SUBMODULES_DEFAULT = 1, |
| 11 | RECURSE_SUBMODULES_ON = 2 |
| 12 | }; |
| 13 | |
Jens Lehmann | aee9c7d | 2010-08-06 00:39:25 +0200 | [diff] [blame] | 14 | void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, |
| 15 | const char *path); |
Jens Lehmann | 7dce19d | 2010-11-12 13:54:52 +0100 | [diff] [blame] | 16 | int submodule_config(const char *var, const char *value, void *cb); |
René Scharfe | c2df758 | 2012-04-10 21:10:26 +0200 | [diff] [blame] | 17 | void gitmodules_config(void); |
Jens Lehmann | aee9c7d | 2010-08-06 00:39:25 +0200 | [diff] [blame] | 18 | int parse_submodule_config_option(const char *var, const char *value); |
Jens Lehmann | 46a958b | 2010-06-25 16:56:47 +0200 | [diff] [blame] | 19 | void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *); |
Jens Lehmann | 88a2197 | 2011-03-06 23:10:46 +0100 | [diff] [blame] | 20 | int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg); |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 21 | void show_submodule_summary(FILE *f, const char *path, |
| 22 | unsigned char one[20], unsigned char two[20], |
Ramkumar Ramachandra | 4e21513 | 2012-11-13 21:12:47 +0530 | [diff] [blame] | 23 | unsigned dirty_submodule, const char *meta, |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 24 | const char *del, const char *add, const char *reset); |
Jens Lehmann | be254a0 | 2010-11-11 00:55:02 +0100 | [diff] [blame] | 25 | void set_config_fetch_recurse_submodules(int value); |
Jens Lehmann | 88a2197 | 2011-03-06 23:10:46 +0100 | [diff] [blame] | 26 | void check_for_new_submodule_commits(unsigned char new_sha1[20]); |
Jens Lehmann | 50d89ad | 2012-09-01 17:27:06 +0200 | [diff] [blame] | 27 | int fetch_populated_submodules(const struct argv_array *options, |
Jens Lehmann | 8f0700d | 2011-03-06 23:11:21 +0100 | [diff] [blame] | 28 | const char *prefix, int command_line_option, |
Jens Lehmann | be254a0 | 2010-11-11 00:55:02 +0100 | [diff] [blame] | 29 | int quiet); |
Jens Lehmann | 3bfc450 | 2010-03-13 23:00:27 +0100 | [diff] [blame] | 30 | unsigned is_submodule_modified(const char *path, int ignore_untracked); |
Jens Lehmann | 293ab15 | 2012-09-26 20:21:13 +0200 | [diff] [blame] | 31 | int submodule_uses_gitfile(const char *path); |
| 32 | int ok_to_remove_submodule(const char *path); |
Heiko Voigt | 68d03e4 | 2010-07-07 15:39:13 +0200 | [diff] [blame] | 33 | int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20], |
Brad King | 8098878 | 2011-10-13 08:59:05 -0400 | [diff] [blame] | 34 | const unsigned char a[20], const unsigned char b[20], int search); |
Heiko Voigt | a762e51 | 2012-03-29 09:21:23 +0200 | [diff] [blame] | 35 | int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name, |
| 36 | struct string_list *needs_pushing); |
Heiko Voigt | eb21c73 | 2012-03-29 09:21:24 +0200 | [diff] [blame] | 37 | int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name); |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 38 | |
| 39 | #endif |