From 9ebf689aad72bfc091da21e1d73a05308f1ace85 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 16 Dec 2016 11:03:18 -0800 Subject: submodules: load gitmodules file from commit sha1 teach submodules to load a '.gitmodules' file from a commit sha1. This enables the population of the submodule_cache to be based on the state of the '.gitmodules' file from a particular commit. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- submodule-config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'submodule-config.h') diff --git a/submodule-config.h b/submodule-config.h index d05c542d2c..78584ba6a7 100644 --- a/submodule-config.h +++ b/submodule-config.h @@ -29,6 +29,9 @@ const struct submodule *submodule_from_name(const unsigned char *commit_sha1, const char *name); const struct submodule *submodule_from_path(const unsigned char *commit_sha1, const char *path); +extern int gitmodule_sha1_from_commit(const unsigned char *commit_sha1, + unsigned char *gitmodules_sha1, + struct strbuf *rev); void submodule_free(void); #endif /* SUBMODULE_CONFIG_H */ -- cgit v1.2.3