diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-01 22:49:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-01 22:49:28 -0700 |
commit | dffc13166ba8950b2ddbac2406042751f96841b7 (patch) | |
tree | 66af1ab857dcce7d829f377f17bb54317eeb118c /builtin-fast-export.c | |
parent | 37a13acb2e9ec58c9dd8ee81a48dd4fa6d90ff29 (diff) | |
parent | 1982467d9229e3c92157f2a41363365dcb866e86 (diff) | |
download | git-dffc13166ba8950b2ddbac2406042751f96841b7.tar.gz |
Merge branch 'ef/fast-export'
* ef/fast-export:
builtin-fast-export.c: handle nested tags
builtin-fast-export.c: fix crash on tagged trees
builtin-fast-export.c: turn error into warning
test-suite: adding a test for fast-export with tag variants
Diffstat (limited to 'builtin-fast-export.c')
-rw-r--r-- | builtin-fast-export.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c index 34a419c38e..6731713223 100644 --- a/builtin-fast-export.c +++ b/builtin-fast-export.c @@ -363,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; } @@ -376,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 */ |