• Jon Seymour's avatar
    submodule: fix sync handling of some relative superproject origin URLs · 967b2c66
    Jon Seymour authored
    When the origin URL of the superproject is itself relative, git submodule sync
    configures the remote.origin.url configuration property of the submodule
    with a path that is relative to the work tree of the superproject
    rather than the work tree of the submodule.
    
    To fix this an 'up_path' that navigates from the work tree of the submodule
    to the work tree of the superproject needs to be prepended to the URL
    otherwise calculated.
    
    Correct handling of superproject origin URLs like foo, ./foo and ./foo/bar is
    left to a subsequent patch since an additional change is required to handle
    these cases.
    
    The documentation of resolve_relative_url() is expanded to give a more thorough
    description of the function's objective.
    Signed-off-by: Jon Seymour's avatarJon Seymour <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    967b2c66
t7403-submodule-sync.sh 4.18 KB