diff options
Diffstat (limited to 'entry.c')
-rw-r--r-- | entry.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,4 @@ #include "git-compat-util.h" -#include "blob.h" #include "object-store-ll.h" #include "dir.h" #include "environment.h" @@ -581,3 +580,8 @@ void unlink_entry(const struct cache_entry *ce, const char *super_prefix) return; schedule_dir_for_removal(ce->name, ce_namelen(ce)); } + +int remove_or_warn(unsigned int mode, const char *file) +{ + return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file); +} |