summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Clemens Buchacher <drizzd@aon.at>2010-10-09 15:53:00 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-12-14 08:55:12 -0800
commitb1735b1ab7743700064af528a998cdc952c8b9a1 (patch)
tree6b2b26f56f394b0f2de5d1242476b65cc68c7d41 /cache.h
parentlstat_cache: optionally return match_len (diff)
downloadtgif-b1735b1ab7743700064af528a998cdc952c8b9a1.tar.xz
do not overwrite files in leading path
If the work tree contains an untracked file x, and unpack-trees wants to checkout a path x/*, the file x is removed unconditionally. Instead, apply the same checks that are normally used for untracked files, and abort if the file cannot be removed. Signed-off-by: Clemens Buchacher <drizzd@aon.at> 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 33decd942d..d85ce86f7f 100644
--- a/cache.h
+++ b/cache.h
@@ -859,7 +859,7 @@ struct cache_def {
extern int has_symlink_leading_path(const char *name, int len);
extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);
-extern int has_symlink_or_noent_leading_path(const char *name, int len);
+extern int check_leading_path(const char *name, int len);
extern int has_dirs_only_path(const char *name, int len, int prefix_len);
extern void schedule_dir_for_removal(const char *name, int len);
extern void remove_scheduled_dirs(void);