aboutsummaryrefslogtreecommitdiffstats
path: root/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index 43767f9043..f918a3a78e 100644
--- a/entry.c
+++ b/entry.c
@@ -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);
+}