diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-27 11:45:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-27 11:45:01 -0700 |
commit | 44f87dac99574a8073ffb1ba8b10bd4d3945f61b (patch) | |
tree | 75d621c381b5af0d9312d69ff6a7d96c9f0cf676 /t/t7417-submodule-path-url.sh | |
parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) | |
parent | 6e9e91e9cae74cd7feb9300563d40361b2b17dd2 (diff) |
Sync with 2.17.2
* maint-2.17:
Git 2.17.2
fsck: detect submodule paths starting with dash
fsck: detect submodule urls starting with dash
Git 2.16.5
Git 2.15.3
Git 2.14.5
submodule-config: ban submodule paths that start with a dash
submodule-config: ban submodule urls that start with dash
submodule--helper: use "--" to signal end of clone options
Diffstat (limited to 't/t7417-submodule-path-url.sh')
-rwxr-xr-x | t/t7417-submodule-path-url.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t7417-submodule-path-url.sh b/t/t7417-submodule-path-url.sh new file mode 100755 index 0000000000..756af8c4d6 --- /dev/null +++ b/t/t7417-submodule-path-url.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +test_description='check handling of .gitmodule path with dash' +. ./test-lib.sh + +test_expect_success 'create submodule with dash in path' ' + git init upstream && + git -C upstream commit --allow-empty -m base && + git submodule add ./upstream sub && + git mv sub ./-sub && + git commit -m submodule +' + +test_expect_success 'clone rejects unprotected dash' ' + test_when_finished "rm -rf dst" && + git clone --recurse-submodules . dst 2>err && + test_i18ngrep ignoring err +' + +test_expect_success 'fsck rejects unprotected dash' ' + test_when_finished "rm -rf dst" && + git init --bare dst && + git -C dst config transfer.fsckObjects true && + test_must_fail git push dst HEAD 2>err && + grep gitmodulesPath err +' + +test_done |