From a762e51ef2a39b0c326a1529dbe7f4cb303960db Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Thu, 29 Mar 2012 09:21:23 +0200 Subject: Refactor submodule push check to use string list instead of integer This allows us to tell the user which submodules have not been pushed. Additionally this is helpful when we want to automatically try to push submodules that have not been pushed. Signed-off-by: Heiko Voigt Signed-off-by: Junio C Hamano --- submodule.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'submodule.h') diff --git a/submodule.h b/submodule.h index 80e04f3c8c..fd58690453 100644 --- a/submodule.h +++ b/submodule.h @@ -29,6 +29,7 @@ int fetch_populated_submodules(int num_options, const char **options, unsigned is_submodule_modified(const char *path, int ignore_untracked); int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20], const unsigned char a[20], const unsigned char b[20], int search); -int check_submodule_needs_pushing(unsigned char new_sha1[20], const char *remotes_name); +int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name, + struct string_list *needs_pushing); #endif -- cgit v1.2.3 From eb21c732d6b642a8f33abd69071a95de01d5061b Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Thu, 29 Mar 2012 09:21:24 +0200 Subject: push: teach --recurse-submodules the on-demand option When using this option git will search for all submodules that have changed in the revisions to be send. It will then try to push the currently checked out branch of each submodule. This helps when a user has finished working on a change which involves submodules and just wants to push everything in one go. Signed-off-by: Fredrik Gustafsson Mentored-by: Jens Lehmann Mentored-by: Heiko Voigt Signed-off-by: Junio C Hamano --- submodule.h | 1 + 1 file changed, 1 insertion(+) (limited to 'submodule.h') diff --git a/submodule.h b/submodule.h index fd58690453..6633b53dfa 100644 --- a/submodule.h +++ b/submodule.h @@ -31,5 +31,6 @@ int merge_submodule(unsigned char result[20], const char *path, const unsigned c const unsigned char a[20], const unsigned char b[20], int search); int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name, struct string_list *needs_pushing); +int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name); #endif -- cgit v1.2.3 From c2df7585efcced5833891938fe01c24c9fb36dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 10 Apr 2012 21:10:26 +0200 Subject: submodule: fix prototype of gitmodules_config Add void to make it match its definition in submodule.c. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- submodule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'submodule.h') diff --git a/submodule.h b/submodule.h index 80e04f3c8c..9c5e5c0c30 100644 --- a/submodule.h +++ b/submodule.h @@ -13,7 +13,7 @@ enum { 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 gitmodules_config(void); int parse_submodule_config_option(const char *var, const char *value); void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *); int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg); -- cgit v1.2.3