Skip to content
  • Brandon Williams's avatar
    repository: enable initialization of submodules · 96dc883b
    Brandon Williams authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Introduce 'repo_submodule_init()' which performs initialization of a
    'struct repository' as a submodule of another 'struct repository'.
    
    The resulting submodule 'struct repository' can be in one of three states:
    
      1. The submodule is initialized and has a worktree.
    
      2. The submodule is initialized but does not have a worktree.  This
         would occur when the submodule's gitdir is present in the
         superproject's 'gitdir/modules/' directory yet the submodule has not
         been checked out in superproject's worktree.
    
      3. The submodule remains uninitialized due to an error in the
         initialization process or there is no matching submodule at the
         provided path in the superproject.
    
    Signed-off-by: default avatarBrandon Williams <bmwill@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    96dc883b