@@ -696,7 +696,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
696
696
return 0 ;
697
697
}
698
698
699
- static void get_patch_ids (struct rev_info * rev , struct patch_ids * ids , const char * prefix )
699
+ static void get_patch_ids (struct rev_info * rev , struct patch_ids * ids )
700
700
{
701
701
struct rev_info check_rev ;
702
702
struct commit * commit ;
@@ -717,7 +717,8 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
717
717
init_patch_ids (ids );
718
718
719
719
/* given a range a..b get all patch ids for b..a */
720
- init_revisions (& check_rev , prefix );
720
+ init_revisions (& check_rev , rev -> prefix );
721
+ check_rev .max_parents = 1 ;
721
722
o1 -> flags ^= UNINTERESTING ;
722
723
o2 -> flags ^= UNINTERESTING ;
723
724
add_pending_object (& check_rev , o1 , "o1" );
@@ -726,10 +727,6 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
726
727
die (_ ("revision walk setup failed" ));
727
728
728
729
while ((commit = get_revision (& check_rev )) != NULL ) {
729
- /* ignore merges */
730
- if (commit -> parents && commit -> parents -> next )
731
- continue ;
732
-
733
730
add_commit_patch_id (commit , ids );
734
731
}
735
732
@@ -1306,7 +1303,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1306
1303
if (hashcmp (o [0 ].item -> sha1 , o [1 ].item -> sha1 ) == 0 )
1307
1304
return 0 ;
1308
1305
}
1309
- get_patch_ids (& rev , & ids , prefix );
1306
+ get_patch_ids (& rev , & ids );
1310
1307
}
1311
1308
1312
1309
if (!use_stdout )
@@ -1508,10 +1505,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
1508
1505
}
1509
1506
1510
1507
init_revisions (& revs , prefix );
1511
- revs .diff = 1 ;
1512
- revs .combine_merges = 0 ;
1513
- revs .ignore_merges = 1 ;
1514
- DIFF_OPT_SET (& revs .diffopt , RECURSIVE );
1508
+ revs .max_parents = 1 ;
1515
1509
1516
1510
if (add_pending_commit (head , & revs , 0 ))
1517
1511
die (_ ("Unknown commit %s" ), head );
@@ -1525,7 +1519,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
1525
1519
return 0 ;
1526
1520
}
1527
1521
1528
- get_patch_ids (& revs , & ids , prefix );
1522
+ get_patch_ids (& revs , & ids );
1529
1523
1530
1524
if (limit && add_pending_commit (limit , & revs , UNINTERESTING ))
1531
1525
die (_ ("Unknown commit %s" ), limit );
@@ -1534,10 +1528,6 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
1534
1528
if (prepare_revision_walk (& revs ))
1535
1529
die (_ ("revision walk setup failed" ));
1536
1530
while ((commit = get_revision (& revs )) != NULL ) {
1537
- /* ignore merges */
1538
- if (commit -> parents && commit -> parents -> next )
1539
- continue ;
1540
-
1541
1531
commit_list_insert (commit , & list );
1542
1532
}
1543
1533
0 commit comments