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()
423
423
sed -e '
424
424
s|//*|/|g
425
425
s|^\(\./\)*||
426
- s|/\./ |/|g
426
+ s|/\(\./\)* |/|g
427
427
:start
428
428
s|\([^/]*\)/\.\./||
429
429
tstart
Original file line number Diff line number Diff line change @@ -171,6 +171,23 @@ test_expect_success 'submodule add with ./ in path' '
171
171
test_cmp empty untracked
172
172
'
173
173
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
+
174
191
test_expect_success ' submodule add with // in path' '
175
192
echo "refs/heads/master" >expect &&
176
193
>empty &&
You can’t perform that action at this time.
0 commit comments