summaryrefslogtreecommitdiff
path: root/builtin-fast-export.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-11-23 12:55:54 +0100
committerJunio C Hamano <gitster@pobox.com>2008-11-23 19:54:51 -0800
commit2075ffb58e3a2d46d9e7606010f7f943f2295376 (patch)
treeb672545c29496147ad52e81da41917e75582c107 /builtin-fast-export.c
parent283b9532831fc0a86c40ac89e1e713b28dabb241 (diff)
downloadgit-2075ffb58e3a2d46d9e7606010f7f943f2295376.tar.gz
fast-export: use an unsorted string list for extra_refs
The list extra_refs contains tags and the objects referenced by them, so that they can be handled at the end. When a tag references a commit, that commit is added to the list using the same name. Also, the function handle_tags_and_duplicates() relies on the order the items were added to extra_refs, so clearly we do not want to use a sorted list here. Noticed by Miklos Vajna. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fast-export.c')
-rw-r--r--builtin-fast-export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 7c93eb878d..7d5d57ad75 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -354,7 +354,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
case OBJ_TAG:
tag = (struct tag *)e->item;
while (tag && tag->object.type == OBJ_TAG) {
- string_list_insert(full_name, extra_refs)->util = tag;
+ string_list_append(full_name, extra_refs)->util = tag;
tag = (struct tag *)tag->tagged;
}
if (!tag)
@@ -374,7 +374,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
}
if (commit->util)
/* more than one name for the same object */
- string_list_insert(full_name, extra_refs)->util = commit;
+ string_list_append(full_name, extra_refs)->util = commit;
else
commit->util = full_name;
}