builtin-fast-export.c: fix crash on tagged trees
[gitweb.git] / builtin-fast-export.c
index fdf4ae9ebdba7832a0ac736d56a7b564bba41baa..1ec459f057a5b282d09f6a9bc030ee5210e7cb38 100644 (file)
@@ -375,11 +375,17 @@ static void get_tags_and_duplicates(struct object_array *pending,
                        case OBJ_BLOB:
                                handle_object(tag->object.sha1);
                                continue;
+                       default:
+                               warning("Tag points to object of unexpected type %s, skipping.",
+                                       typename(tag->object.type));
+                               continue;
                        }
                        break;
                default:
-                       die ("Unexpected object of type %s",
-                            typename(e->item->type));
+                       warning("%s: Unexpected object of type %s, skipping.",
+                               e->name,
+                               typename(e->item->type));
+                       continue;
                }
                if (commit->util)
                        /* more than one name for the same object */