From d2b17b3220cbd75b1c8e2aa6cfdc5c121749c97d Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Sat, 20 Aug 2011 00:08:47 +0200 Subject: push: Don't push a repository with unpushed submodules When working with submodules it is easy to forget to push a submodule to the server but pushing a super-project that contains a commit for that submodule. The result is that the superproject points at a submodule commit that is not available on the server. This adds the option --recurse-submodules=check to push. When using this option git will check that all submodule commits that are about to be pushed are present on a remote of the submodule. To be able to use a combined diff, disabling a diff callback has been removed from combined-diff.c. 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 5350b0d5a0..799c22d6c6 100644 --- a/submodule.h +++ b/submodule.h @@ -29,5 +29,6 @@ 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 check_submodule_needs_pushing(unsigned char new_sha1[20], const char *remotes_name); #endif -- cgit v1.2.3