Code

git-mergetool: properly handle "git mergetool -- filename"
[git.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index 6883d1bd68d158290acb18ae9b4e8baba7525201..ab64c18a2baf5e88de8e98d9d8526ba3a7dfed14 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -155,8 +155,6 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func)
        o_mode = 0;
        o_name = NULL;
        o_sha1 = NULL;
-       if (!desc.size)
-               return error_func(&item->object, FSCK_ERROR, "empty tree");
 
        while (desc.size) {
                unsigned mode;
@@ -329,7 +327,7 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...)
                        die("this should not happen, your snprintf is broken");
        }
 
-       error(sb.buf);
+       error("%s", sb.buf);
        strbuf_release(&sb);
        return 1;
 }