Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
submodule: ignore trailing slash in relative url
[gitweb.git]
/
builtin
/
submodule--helper.c
diff --git
a/builtin/submodule--helper.c
b/builtin/submodule--helper.c
index 612e87084c7d00d3534278da975542130faf6e49..569bc8cf3d08d6b189ee9b2b2899fe24d57563b7 100644
(file)
--- a/
builtin/submodule--helper.c
+++ b/
builtin/submodule--helper.c
@@
-149,6
+149,8
@@
static char *relative_url(const char *remote_url,
}
strbuf_reset(&sb);
strbuf_addf(&sb, "%s%s%s", remoteurl, colonsep ? ":" : "/", url);
+ if (ends_with(url, "/"))
+ strbuf_setlen(&sb, sb.len - 1);
free(remoteurl);
if (starts_with_dot_slash(sb.buf))