summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 283b953)
raw | patch | inline | side by side (parent: 283b953)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 23 Nov 2008 11:55:54 +0000 (12:55 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 24 Nov 2008 03:54:51 +0000 (19:54 -0800) |
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>
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>
builtin-fast-export.c | patch | blob | history | |
t/t9301-fast-export.sh | patch | blob | history |
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 7c93eb878d7da87b39959fb9599e4b7b6b81570b..7d5d57ad7568b8c0bf7396cdbd581c67ab4600e2 100644 (file)
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
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)
}
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;
}
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 7607a12dbbc621656276e3bdadc7d65653705ff1..638c858dc7b640fdff4af5902ed79c95e9d9d040 100755 (executable)
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
'
-test_expect_failure 'fast-export | fast-import when master is tagged' '
+test_expect_success 'fast-export | fast-import when master is tagged' '
git tag -m msg last &&
git fast-export -C -C --signed-tags=strip --all > output &&