Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-17 10:53:12 +0400
committerJunio C Hamano <gitster@pobox.com>2009-08-18 14:32:45 +0400
commitda02ca508b842e61c71d920310ff30bbe0238993 (patch)
tree1df912cd8732c7fcd91b33a8b2b847b47dc484f7 /cache.h
parentb6986d8a75812a003a1623e0f0dff93c4a026b44 (diff)
check_path(): allow symlinked directories to checkout-index --prefix
Merlyn noticed that Documentation/install-doc-quick.sh no longer correctly removes old installed documents when the target directory has a leading path that is a symlink. It turns out that "checkout-index --prefix" was broken by recent b6986d8 (git-checkout: be careful about untracked symlinks, 2009-07-29). I suspect has_symlink_leading_path() could learn the third parameter (prefix that is allowed to be symlinked directories) to allow us to retire a similar function has_dirs_only_path(). Another avenue of fixing this I considered was to get rid of base_dir and base_dir_len from "struct checkout", and instead make "git checkout-index" when run with --prefix mkdir the leading path and chdir in there. It might be the best longer term solution to this issue, as the base_dir feature is used only by that rather obscure codepath as far as I know. But at least this patch should fix this breakage. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 9222774e6c..2c2f05c3e0 100644
--- a/cache.h
+++ b/cache.h
@@ -469,7 +469,7 @@ extern int index_path(unsigned char *sha1, const char *path, struct stat *st, in
extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
/* "careful lstat()" */
-extern int check_path(const char *path, int len, struct stat *st);
+extern int check_path(const char *path, int len, struct stat *st, int skiplen);
#define REFRESH_REALLY 0x0001 /* ignore_valid */
#define REFRESH_UNMERGED 0x0002 /* allow unmerged */