summaryrefslogtreecommitdiffstats
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-06 01:31:27 +0100
committerJunio C Hamano <gitster@pobox.com>2021-02-06 01:31:27 +0100
commit635ff6759069dfea7c6e448afa8c245405f53a18 (patch)
tree147b0958b8d9e1bf24141e166041f3b2b286cada /fsck.c
parentMerge branch 'jc/macos-install-dependencies-fix' into maint (diff)
parentfsck: reject .gitmodules git:// urls with newlines (diff)
downloadgit-635ff6759069dfea7c6e448afa8c245405f53a18.tar.xz
git-635ff6759069dfea7c6e448afa8c245405f53a18.zip
Merge branch 'jk/forbid-lf-in-git-url' into maint
Newline characters in the host and path part of git:// URL are now forbidden. * jk/forbid-lf-in-git-url: fsck: reject .gitmodules git:// urls with newlines git_connect_git(): forbid newlines in host and path
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index f82e2fe9e3..5e282b3b6b 100644
--- a/fsck.c
+++ b/fsck.c
@@ -1082,7 +1082,7 @@ static int check_submodule_url(const char *url)
if (looks_like_command_line_option(url))
return -1;
- if (submodule_url_is_relative(url)) {
+ if (submodule_url_is_relative(url) || starts_with(url, "git://")) {
char *decoded;
const char *next;
int has_nl;