blob: 5350b0d5a0d16e12e96b983e6510cb1d4098f962 [file] [log] [blame]
Johannes Schindelin752c0c22009-10-19 14:38:32 +02001#ifndef SUBMODULE_H
2#define SUBMODULE_H
3
Jens Lehmann46a958b2010-06-25 16:56:47 +02004struct diff_options;
5
Jens Lehmann88a21972011-03-06 23:10:46 +01006enum {
7 RECURSE_SUBMODULES_ON_DEMAND = -1,
8 RECURSE_SUBMODULES_OFF = 0,
9 RECURSE_SUBMODULES_DEFAULT = 1,
10 RECURSE_SUBMODULES_ON = 2
11};
12
Jens Lehmannaee9c7d2010-08-06 00:39:25 +020013void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
14 const char *path);
Jens Lehmann7dce19d2010-11-12 13:54:52 +010015int submodule_config(const char *var, const char *value, void *cb);
Jens Lehmann302ad7a2010-08-06 00:40:48 +020016void gitmodules_config();
Jens Lehmannaee9c7d2010-08-06 00:39:25 +020017int parse_submodule_config_option(const char *var, const char *value);
Jens Lehmann46a958b2010-06-25 16:56:47 +020018void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *);
Jens Lehmann88a21972011-03-06 23:10:46 +010019int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
Johannes Schindelin752c0c22009-10-19 14:38:32 +020020void show_submodule_summary(FILE *f, const char *path,
21 unsigned char one[20], unsigned char two[20],
Jens Lehmann721ceec2010-01-24 15:09:00 +010022 unsigned dirty_submodule,
Johannes Schindelin752c0c22009-10-19 14:38:32 +020023 const char *del, const char *add, const char *reset);
Jens Lehmannbe254a02010-11-11 00:55:02 +010024void set_config_fetch_recurse_submodules(int value);
Jens Lehmann88a21972011-03-06 23:10:46 +010025void check_for_new_submodule_commits(unsigned char new_sha1[20]);
Jens Lehmann7dce19d2010-11-12 13:54:52 +010026int fetch_populated_submodules(int num_options, const char **options,
Jens Lehmann8f0700d2011-03-06 23:11:21 +010027 const char *prefix, int command_line_option,
Jens Lehmannbe254a02010-11-11 00:55:02 +010028 int quiet);
Jens Lehmann3bfc4502010-03-13 23:00:27 +010029unsigned is_submodule_modified(const char *path, int ignore_untracked);
Heiko Voigt68d03e42010-07-07 15:39:13 +020030int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20],
31 const unsigned char a[20], const unsigned char b[20]);
Johannes Schindelin752c0c22009-10-19 14:38:32 +020032
33#endif