Browse Source

Merge branch 'mv/fast-export' into maint

* mv/fast-export:
  fast-export: use an unsorted string list for extra_refs
  Add new testcase to show fast-export does not always exports all tags
maint
Junio C Hamano 16 years ago
parent
commit
539eec48f0
  1. 4
      builtin-fast-export.c
  2. 8
      t/t9301-fast-export.sh

4
builtin-fast-export.c

@ -354,7 +354,7 @@ static void get_tags_and_duplicates(struct object_array *pending, @@ -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, @@ -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;
}

8
t/t9301-fast-export.sh

@ -231,4 +231,12 @@ test_expect_success 'fast-export -C -C | fast-import' ' @@ -231,4 +231,12 @@ test_expect_success 'fast-export -C -C | fast-import' '

'

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 &&
test $(grep -c "^tag " output) = 3

'

test_done

Loading…
Cancel
Save