summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2015-01-30 15:14:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-02-02 20:35:16 (GMT)
commit8196e728955a084303e99affff2ebc1120112516 (patch)
tree7bcda3a021552aa76e24b1614903650412a82280 /git-submodule.sh
parent3d8a54eb37d298c251c0b6823dc06935a611bc33 (diff)
downloadgit-8196e728955a084303e99affff2ebc1120112516.zip
git-8196e728955a084303e99affff2ebc1120112516.tar.gz
git-8196e728955a084303e99affff2ebc1120112516.tar.bz2
git-submodule.sh: fix '/././' path normalization
When we add a new submodule the path of the submodule is being normalized. We fail to normalize multiple adjacent '/./', though. Thus 'path/to/././submodule' will become 'path/to/./submodule' where it should be 'path/to/submodule' instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 66f5f75..6bf85f5 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -420,7 +420,7 @@ cmd_add()
sed -e '
s|//*|/|g
s|^\(\./\)*||
- s|/\./|/|g
+ s|/\(\./\)*|/|g
:start
s|\([^/]*\)/\.\./||
tstart