File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed
Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -450,24 +450,6 @@ test_expect_success 'update-index D/F conflict' '
450450 test $numpath0 = 1
451451'
452452
453- test_expect_success SYMLINKS ' real path works as expected' '
454- mkdir first &&
455- ln -s ../.git first/.git &&
456- mkdir second &&
457- ln -s ../first second/other &&
458- mkdir third &&
459- dir="$(cd .git; pwd -P)" &&
460- dir2=third/../second/other/.git &&
461- test "$dir" = "$(test-path-utils real_path $dir2)" &&
462- file="$dir"/index &&
463- test "$file" = "$(test-path-utils real_path $dir2/index)" &&
464- basename=blub &&
465- test "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&
466- ln -s ../first/file .git/syml &&
467- sym="$(cd first; pwd -P)"/file &&
468- test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
469- '
470-
471453test_expect_success ' very long name in the index handled sanely' '
472454
473455 a=a && # 1
Original file line number Diff line number Diff line change @@ -139,4 +139,23 @@ test_expect_success 'strip_path_suffix' '
139139 test c:/msysgit = $(test-path-utils strip_path_suffix \
140140 c:/msysgit/libexec//git-core libexec/git-core)
141141'
142+
143+ test_expect_success SYMLINKS ' real path works as expected' '
144+ mkdir first &&
145+ ln -s ../.git first/.git &&
146+ mkdir second &&
147+ ln -s ../first second/other &&
148+ mkdir third &&
149+ dir="$(cd .git; pwd -P)" &&
150+ dir2=third/../second/other/.git &&
151+ test "$dir" = "$(test-path-utils real_path $dir2)" &&
152+ file="$dir"/index &&
153+ test "$file" = "$(test-path-utils real_path $dir2/index)" &&
154+ basename=blub &&
155+ test "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&
156+ ln -s ../first/file .git/syml &&
157+ sym="$(cd first; pwd -P)"/file &&
158+ test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
159+ '
160+
142161test_done
You can’t perform that action at this time.
0 commit comments