Skip to content

Commit 539eec4

Browse files
committed
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
2 parents 3524357 + 2075ffb commit 539eec4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

builtin-fast-export.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
354354
case OBJ_TAG:
355355
tag = (struct tag *)e->item;
356356
while (tag && tag->object.type == OBJ_TAG) {
357-
string_list_insert(full_name, extra_refs)->util = tag;
357+
string_list_append(full_name, extra_refs)->util = tag;
358358
tag = (struct tag *)tag->tagged;
359359
}
360360
if (!tag)
@@ -374,7 +374,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
374374
}
375375
if (commit->util)
376376
/* more than one name for the same object */
377-
string_list_insert(full_name, extra_refs)->util = commit;
377+
string_list_append(full_name, extra_refs)->util = commit;
378378
else
379379
commit->util = full_name;
380380
}

t/t9301-fast-export.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,12 @@ test_expect_success 'fast-export -C -C | fast-import' '
231231
232232
'
233233

234+
test_expect_success 'fast-export | fast-import when master is tagged' '
235+
236+
git tag -m msg last &&
237+
git fast-export -C -C --signed-tags=strip --all > output &&
238+
test $(grep -c "^tag " output) = 3
239+
240+
'
241+
234242
test_done

0 commit comments

Comments
 (0)