submodule: add get_submodule_url helper function
authorW. Trevor King <wking@tremily.us>
Fri, 30 Nov 2012 18:36:03 +0000 (13:36 -0500)
committerW. Trevor King <wking@tremily.us>
Sun, 2 Dec 2012 18:22:21 +0000 (13:22 -0500)
commit57be28cb071eddd90cc4f6328fbb89935438572c
tree933f46150ff727f7f5b0687c5f0973d6ceb8f440
parent436a73a8fdc8f0695aa597d53483d4c4bae16ebb
submodule: add get_submodule_url helper function

Add the new function and a number of helper functions.  This reduces
the logic in resolve_relative_url quite a bit, factoring a good deal
it's earlier shell wrangling into new (more robust) sub-functions like
url_type and join_urls.

Signed-off-by: W. Trevor King <wking@tremily.us>
git-submodule.sh