summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2012-10-28 17:16:26 +0100
committerLibravatar Jeff King <peff@peff.net>2012-10-29 02:34:58 -0400
commit1b77d83cab798668d8a54a05b3fa0262486f7dfc (patch)
tree4fb68b8b55c5e54486adc75c8a6a31ea9d081cf4 /perl
parentlongest_ancestor_length(): require prefix list entries to be normalized (diff)
downloadtgif-1b77d83cab798668d8a54a05b3fa0262486f7dfc.tar.xz
setup_git_directory_gently_1(): resolve symlinks in ceiling paths
longest_ancestor_length() relies on a textual comparison of directory parts to find the part of path that overlaps with one of the paths in prefix_list. But this doesn't work if any of the prefixes involves a symbolic link, because the directories will look different even though they might logically refer to the same directory. So canonicalize the paths listed in GIT_CEILING_DIRECTORIES using real_path_if_valid() before passing them to longest_ancestor_length(). (Also rename normalize_ceiling_entry() to canonicalize_ceiling_entry() to reflect the change.) path is already in canonical form, so doesn't need to be canonicalized again. This fixes some problems with using GIT_CEILING_DIRECTORIES that contains paths involving symlinks, including t4035 if run with --root set to a path involving symlinks. Please note that test t0060 is *not* changed analogously, because that would make the test suite results dependent on the contents of the local root directory. However, real_path() is already tested independently, and the "ancestor" tests cover the non-normalization aspects of longest_ancestor_length(), so coverage remains sufficient. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'perl')
0 files changed, 0 insertions, 0 deletions