diff --git a/builtin-fsck.c b/builtin-fsck.c
index fcb8ed5af1bc50df19a2f533989aa9673ea166e8..cbbcaf011a09d1dd9b3f2a01d18e1ab93e26fd3b 100644 (file)
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
{
int retval;
int has_full_path = 0;
{
int retval;
int has_full_path = 0;
+ int has_empty_name = 0;
int has_zero_pad = 0;
int has_bad_modes = 0;
int has_dup_entries = 0;
int has_zero_pad = 0;
int has_bad_modes = 0;
int has_dup_entries = 0;
if (strchr(name, '/'))
has_full_path = 1;
if (strchr(name, '/'))
has_full_path = 1;
+ if (!*name)
+ has_empty_name = 1;
has_zero_pad |= *(char *)desc.buffer == '0';
update_tree_entry(&desc);
has_zero_pad |= *(char *)desc.buffer == '0';
update_tree_entry(&desc);
case S_IFREG | 0644:
case S_IFLNK:
case S_IFDIR:
case S_IFREG | 0644:
case S_IFLNK:
case S_IFDIR:
- case S_IFDIRLNK:
+ case S_IFGITLINK:
break;
/*
* This is nonstandard, but we had a few of these
break;
/*
* This is nonstandard, but we had a few of these
if (has_full_path) {
objwarning(&item->object, "contains full pathnames");
}
if (has_full_path) {
objwarning(&item->object, "contains full pathnames");
}
+ if (has_empty_name) {
+ objwarning(&item->object, "contains empty pathname");
+ }
if (has_zero_pad) {
objwarning(&item->object, "contains zero-padded file modes");
}
if (has_zero_pad) {
objwarning(&item->object, "contains zero-padded file modes");
}
struct object *obj;
mode = ntohl(active_cache[i]->ce_mode);
struct object *obj;
mode = ntohl(active_cache[i]->ce_mode);
- if (S_ISDIRLNK(mode))
+ if (S_ISGITLINK(mode))
continue;
blob = lookup_blob(active_cache[i]->sha1);
if (!blob)
continue;
blob = lookup_blob(active_cache[i]->sha1);
if (!blob)