diff options
author | Stefan Beller <sbeller@google.com> | 2016-12-12 11:04:35 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-12 15:15:07 -0800 |
commit | f6f858614003a3da794385cefdbddf00b85f7501 (patch) | |
tree | e62a35068d126bc51f6ab83651b57077ba794e29 /submodule.h | |
parent | 47e83eb3b7d5410769d7f4d3930ba7fa12915680 (diff) | |
download | git-f6f858614003a3da794385cefdbddf00b85f7501.tar.gz |
submodule: add absorb-git-dir function
When a submodule has its git dir inside the working dir, the submodule
support for checkout that we plan to add in a later patch will fail.
Add functionality to migrate the git directory to be absorbed
into the superprojects git directory.
The newly added code in this patch is structured such that other areas of
Git can also make use of it. The code in the submodule--helper is a mere
wrapper and option parser for the function
`absorb_git_dir_into_superproject`, that takes care of embedding the
submodules git directory into the superprojects git dir. That function
makes use of the more abstract function for this use case
`relocate_gitdir`, which can be used by e.g. the worktree code eventually
to move around a git directory.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.h')
-rw-r--r-- | submodule.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h index 4e3bf469b4..6229054b99 100644 --- a/submodule.h +++ b/submodule.h @@ -74,4 +74,8 @@ int parallel_submodules(void); */ void prepare_submodule_repo_env(struct argv_array *out); +#define ABSORB_GITDIR_RECURSE_SUBMODULES (1<<0) +extern void absorb_git_dir_into_superproject(const char *prefix, + const char *path, + unsigned flags); #endif |