From: Junio C Hamano Date: Tue, 16 Aug 2011 19:41:13 +0000 (-0700) Subject: Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint X-Git-Tag: v1.7.6.1~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f4af7f19639457d71c4e9b53892b937468824cac;p=git.git Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint * jl/submodule-add-relurl-wo-upstream: submodule add: clean up duplicated code submodule add: allow relative repository path even when no url is set submodule add: test failure when url is not configured in superproject Conflicts: git-submodule.sh --- f4af7f19639457d71c4e9b53892b937468824cac diff --cc git-submodule.sh index 20c9bec97,32cb05443..f8ea3bf6f --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -238,14 -238,7 +238,6 @@@ cmd_add( die "'$path' already exists and is not a valid git repo" fi - case "$repo" in - ./*|../*) - url=$(resolve_relative_url "$repo") || exit - ;; - *) - url="$repo" - ;; - esac - git config submodule."$path".url "$realrepo" else module_clone "$path" "$realrepo" "$reference" || exit @@@ -259,7 -252,6 +251,7 @@@ esac ) || die "Unable to checkout submodule '$path'" fi - git config submodule."$path".url "$url" ++ git config submodule."$path".url "$realrepo" git add $force "$path" || die "Failed to add submodule '$path'"