summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 26e6016)
raw | patch | inline | side by side (parent: 26e6016)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 29 Apr 2007 00:29:23 +0000 (20:29 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 29 Apr 2007 01:06:00 +0000 (18:06 -0700) |
Released versions of fast-import have been able to create a tree that
contains files or subtrees that contain no name. Unfortunately these
trees aren't valid, but people may have actually tried to create them
due to bugs in import-tars.perl or their own fast-import frontend.
We now look for this unusual condition and warn the user if at
least one of their tree objects contains the problem.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contains files or subtrees that contain no name. Unfortunately these
trees aren't valid, but people may have actually tried to create them
due to bugs in import-tars.perl or their own fast-import frontend.
We now look for this unusual condition and warn the user if at
least one of their tree objects contains the problem.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fsck.c | patch | blob | history |
diff --git a/builtin-fsck.c b/builtin-fsck.c
index 7c3b0a535f81a350d11df112a6a5b5a49b139afb..75e10e25ecdee18b226fe434c270d5660eb5d74b 100644 (file)
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
{
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;
if (strchr(name, '/'))
has_full_path = 1;
+ if (!*name)
+ has_empty_name = 1;
has_zero_pad |= *(char *)desc.buffer == '0';
update_tree_entry(&desc);
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");
}