]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-fast-export.c
gitweb: use git_print_authorship_rows in 'tag' view too
[thirdparty/git.git] / builtin-fast-export.c
index fdf4ae9ebdba7832a0ac736d56a7b564bba41baa..6cef8103127a8748acb64ca7ec7a7a95fb639cd3 100644 (file)
@@ -221,7 +221,8 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
        if (message)
                message += 2;
 
-       if (commit->parents) {
+       if (commit->parents &&
+           get_object_mark(&commit->parents->item->object) != 0) {
                parse_commit(commit->parents->item);
                diff_tree_sha1(commit->parents->item->tree->object.sha1,
                               commit->tree->object.sha1, "", &rev->diffopt);
@@ -362,7 +363,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
                        break;
                case OBJ_TAG:
                        tag = (struct tag *)e->item;
+
+                       /* handle nested tags */
                        while (tag && tag->object.type == OBJ_TAG) {
+                               parse_object(tag->object.sha1);
                                string_list_append(full_name, extra_refs)->util = tag;
                                tag = (struct tag *)tag->tagged;
                        }
@@ -375,11 +379,17 @@ static void get_tags_and_duplicates(struct object_array *pending,
                        case OBJ_BLOB:
                                handle_object(tag->object.sha1);
                                continue;
+                       default: /* OBJ_TAG (nested tags) is already handled */
+                               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 */
@@ -505,7 +515,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
 
        init_revisions(&revs, prefix);
        argc = setup_revisions(argc, argv, &revs, NULL);
-       argc = parse_options(argc, argv, options, fast_export_usage, 0);
+       argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0);
        if (argc > 1)
                usage_with_options (fast_export_usage, options);