From 5fee995244e13fd59500425d49038b00499396f8 Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Tue, 30 Jul 2013 21:50:34 +0200 Subject: submodule.c: add .gitmodules staging helper functions Add the new is_staging_gitmodules_ok() and stage_updated_gitmodules() functions to submodule.c. The first makes it possible for call sites to see if the .gitmodules file did contain any unstaged modifications they would accidentally stage in addition to those they intend to stage themselves. The second function stages all modifications to the .gitmodules file, both will be used by subsequent patches for the mv and rm commands. Signed-off-by: Jens Lehmann Signed-off-by: Junio C Hamano --- submodule.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'submodule.h') diff --git a/submodule.h b/submodule.h index 29e9658980..5501354568 100644 --- a/submodule.h +++ b/submodule.h @@ -11,6 +11,8 @@ enum { RECURSE_SUBMODULES_ON = 2 }; +int is_staging_gitmodules_ok(void); +void stage_updated_gitmodules(void); 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); -- cgit v1.2.1