Skip to content
  • vi's avatar
    submodule--helper: set alternateLocation for cloned submodules · bf03b790
    vi authored and Junio C Hamano's avatar Junio C Hamano committed
    In 31224cbd
    
     (clone: recursive and reference option triggers
    submodule alternates, 2016-08-17) a mechanism was added to
    have submodules referenced.  It did not address _nested_
    submodules, however.
    
    This patch makes all not just the root repository, but also
    all submodules (recursively) have submodule.alternateLocation
    and submodule.alternateErrorStrategy configured, making Git
    search for possible alternates for nested submodules as well.
    
    As submodule's alternate target does not end in .git/objects
    (rather .git/modules/qqqqqq/objects), this alternate target
    path restriction for in add_possible_reference_from_superproject
    relates from "*.git/objects" to just */objects".
    
    New tests have been added to t7408-submodule-reference.
    
    Signed-off-by: default avatarVitaly _Vi Shukela <vi0oss@gmail.com>
    Reviewed-by: default avatarStefan Beller <sbeller@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    bf03b790