@@ -107,18 +107,6 @@ static int parse_opt_reencode_mode(const struct option *opt,
107
107
108
108
static struct decoration idnums ;
109
109
static uint32_t last_idnum ;
110
-
111
- static int has_unshown_parent (struct commit * commit )
112
- {
113
- struct commit_list * parent ;
114
-
115
- for (parent = commit -> parents ; parent ; parent = parent -> next )
116
- if (!(parent -> item -> object .flags & SHOWN ) &&
117
- !(parent -> item -> object .flags & UNINTERESTING ))
118
- return 1 ;
119
- return 0 ;
120
- }
121
-
122
110
struct anonymized_entry {
123
111
struct hashmap_entry hash ;
124
112
const char * anon ;
@@ -752,20 +740,6 @@ static char *anonymize_tag(void *data)
752
740
return strbuf_detach (& out , NULL );
753
741
}
754
742
755
- static void handle_tail (struct object_array * commits , struct rev_info * revs ,
756
- struct string_list * paths_of_changed_objects )
757
- {
758
- struct commit * commit ;
759
- while (commits -> nr ) {
760
- commit = (struct commit * )object_array_pop (commits );
761
- if (has_unshown_parent (commit )) {
762
- /* Queue again, to be handled later */
763
- add_object_array (& commit -> object , NULL , commits );
764
- return ;
765
- }
766
- handle_commit (commit , revs , paths_of_changed_objects );
767
- }
768
- }
769
743
770
744
static void handle_tag (const char * name , struct tag * tag )
771
745
{
@@ -1185,7 +1159,6 @@ static int parse_opt_anonymize_map(const struct option *opt,
1185
1159
int cmd_fast_export (int argc , const char * * argv , const char * prefix )
1186
1160
{
1187
1161
struct rev_info revs ;
1188
- struct object_array commits = OBJECT_ARRAY_INIT ;
1189
1162
struct commit * commit ;
1190
1163
char * export_filename = NULL ,
1191
1164
* import_filename = NULL ,
@@ -1283,18 +1256,13 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
1283
1256
1284
1257
if (prepare_revision_walk (& revs ))
1285
1258
die ("revision walk setup failed" );
1259
+
1260
+ revs .reverse = 1 ;
1286
1261
revs .diffopt .format_callback = show_filemodify ;
1287
1262
revs .diffopt .format_callback_data = & paths_of_changed_objects ;
1288
1263
revs .diffopt .flags .recursive = 1 ;
1289
- while ((commit = get_revision (& revs ))) {
1290
- if (has_unshown_parent (commit )) {
1291
- add_object_array (& commit -> object , NULL , & commits );
1292
- }
1293
- else {
1294
- handle_commit (commit , & revs , & paths_of_changed_objects );
1295
- handle_tail (& commits , & revs , & paths_of_changed_objects );
1296
- }
1297
- }
1264
+ while ((commit = get_revision (& revs )))
1265
+ handle_commit (commit , & revs , & paths_of_changed_objects );
1298
1266
1299
1267
handle_tags_and_duplicates (& extra_refs );
1300
1268
handle_tags_and_duplicates (& tag_refs );
0 commit comments