File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ cmd_add()
423423 sed -e '
424424 s|//*|/|g
425425 s|^\(\./\)*||
426- s|/\./ |/|g
426+ s|/\(\./\)* |/|g
427427 :start
428428 s|\([^/]*\)/\.\./||
429429 tstart
Original file line number Diff line number Diff line change @@ -171,6 +171,23 @@ test_expect_success 'submodule add with ./ in path' '
171171 test_cmp empty untracked
172172'
173173
174+ test_expect_success ' submodule add with /././ in path' '
175+ echo "refs/heads/master" >expect &&
176+ >empty &&
177+
178+ (
179+ cd addtest &&
180+ git submodule add "$submodurl" dotslashdotsubmod/././frotz/./ &&
181+ git submodule init
182+ ) &&
183+
184+ rm -f heads head untracked &&
185+ inspect addtest/dotslashdotsubmod/frotz ../../.. &&
186+ test_cmp expect heads &&
187+ test_cmp expect head &&
188+ test_cmp empty untracked
189+ '
190+
174191test_expect_success ' submodule add with // in path' '
175192 echo "refs/heads/master" >expect &&
176193 >empty &&
You can’t perform that action at this time.
0 commit comments