summaryrefslogtreecommitdiff
path: root/builtin-fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-29 08:52:43 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-29 08:52:43 (GMT)
commit39231b1c32caee10c7ac3397341ea0c6cf56e7f9 (patch)
tree5e51fb9d639bf6b6b99ae5d01286360b7303f2f1 /builtin-fsck.c
parent4342572600f446b9f8db553df03d458229f944dd (diff)
parente9d54bd18bcf5dc9eb68eb1cba9a6a7ba3f71fd6 (diff)
downloadgit-39231b1c32caee10c7ac3397341ea0c6cf56e7f9.zip
git-39231b1c32caee10c7ac3397341ea0c6cf56e7f9.tar.gz
git-39231b1c32caee10c7ac3397341ea0c6cf56e7f9.tar.bz2
Merge branch 'maint'
* maint: http.c: Fix problem with repeated calls of http_init Add missing reference to GIT_COMMITTER_DATE in git-commit-tree documentation Fix import-tars fix. Update .mailmap with "Michael" Do not barf on too long action description Catch empty pathnames in trees during fsck Don't allow empty pathnames in fast-import import-tars: be nice to wrong directory modes git-svn: Added 'find-rev' command git shortlog documentation: add long options and fix a typo
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r--builtin-fsck.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c
index fcb8ed5..44ce629 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -219,6 +219,7 @@ static int fsck_tree(struct tree *item)
{
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;
@@ -242,6 +243,8 @@ static int fsck_tree(struct tree *item)
if (strchr(name, '/'))
has_full_path = 1;
+ if (!*name)
+ has_empty_name = 1;
has_zero_pad |= *(char *)desc.buffer == '0';
update_tree_entry(&desc);
@@ -291,6 +294,9 @@ static int fsck_tree(struct tree *item)
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");
}