Merge branch 'mh/maint-ceil-absolute'

An earlier workaround designed to help people who list logical
directories that will not match what getcwd(3) returns in the
GIT_CEILING_DIRECTORIES had an adverse effect when it is slow to
stat and readlink a directory component of an element listed on it.

* mh/maint-ceil-absolute:
  Provide a mechanism to turn off symlink resolution in ceiling paths
This commit is contained in:
Junio C Hamano
2013-02-27 09:47:27 -08:00
3 changed files with 52 additions and 16 deletions

View File

@ -44,6 +44,10 @@ test_prefix ceil_at_sub ""
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
test_prefix ceil_at_sub_slash ""
if test_have_prereq SYMLINKS
then
ln -s sub top
fi
mkdir -p sub/dir || exit 1
cd sub/dir || exit 1
@ -68,6 +72,19 @@ test_fail subdir_ceil_at_sub
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
test_fail subdir_ceil_at_sub_slash
if test_have_prereq SYMLINKS
then
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top"
test_fail subdir_ceil_at_top
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top/"
test_fail subdir_ceil_at_top_slash
GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top"
test_prefix subdir_ceil_at_top_no_resolve "sub/dir/"
GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top/"
test_prefix subdir_ceil_at_top_slash_no_resolve "sub/dir/"
fi
GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/dir"
test_prefix subdir_ceil_at_subdir "sub/dir/"