Mark Levedahl <mlevedahl@xxxxxxxxx> writes: > git clone does not complain if a trailing '/' is included in the origin > URL, but doing so causes resolution of a submodule's URL relative to the > superproject to fail. Trailing /'s are likely when cloning locally using > tab-completion, so the slash may appear in either superproject or > submodule URL. So, ignore the trailing slash if it already exists in > the superproject's URL, and don't record one for the submodule (which > could itself have submodules...). > > Signed-off-by: Mark Levedahl <mlevedahl@xxxxxxxxx> > --- > git-submodule.sh | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) Hmm. I was sort of hoping to hear "Junio you idiot you do not know what you are talking about --- your example of using ".." as relative won't happen because of such and such reasons; trust me I know what is going on in the vicinity of this code." And after looking at the callsites of the shell function, I think the original can never pass ".." (there are case statements to pass only $url that match "./*" or "../*"), so I think both your original and this version are safe as long as the part that match the trailing "/*" is sane. So I'll queue your first patch, as it is slightly shorter ;-) Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html