Commits

Junio C Hamano  committed 539eec4 Merge

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

  • Participants
  • Parent commits 3524357, 2075ffb

Comments (0)

Files changed (2)

File 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;
 	}

File t/t9301-fast-export.sh

 
 '
 
+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