@@ -427,10 +427,6 @@ static int switch_cache_bottom(struct traverse_info *info)
427
427
return ret ;
428
428
}
429
429
430
- static int fast_forward_merge (int n , unsigned long dirmask ,
431
- struct name_entry * names ,
432
- struct traverse_info * info );
433
-
434
430
static int traverse_trees_recursive (int n , unsigned long dirmask ,
435
431
unsigned long df_conflicts ,
436
432
struct name_entry * names ,
@@ -442,11 +438,6 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
442
438
struct traverse_info newinfo ;
443
439
struct name_entry * p ;
444
440
445
- if (!df_conflicts ) {
446
- int status = fast_forward_merge (n , dirmask , names , info );
447
- if (status )
448
- return status ;
449
- }
450
441
p = names ;
451
442
while (!p -> mode )
452
443
p ++ ;
@@ -694,53 +685,6 @@ static struct cache_entry *find_cache_entry(struct traverse_info *info,
694
685
return NULL ;
695
686
}
696
687
697
- static int fast_forward_merge (int n , unsigned long dirmask ,
698
- struct name_entry * names ,
699
- struct traverse_info * info )
700
- {
701
- int i ;
702
- struct cache_entry * src [MAX_UNPACK_TREES + 1 ] = { NULL , };
703
- struct unpack_trees_options * o = info -> data ;
704
-
705
- /* merging two or more trees with an identical subdirectory? */
706
- if ((n < 2 ) || ((1UL << n ) - 1 ) != dirmask ||
707
- !o -> merge || o -> reset || o -> initial_checkout )
708
- return 0 ;
709
- for (i = 1 ; i < n ; i ++ )
710
- if (hashcmp (names [i - 1 ].sha1 , names [i ].sha1 ))
711
- return 0 ;
712
-
713
- /*
714
- * Instead of descending into the directory, keep the contents
715
- * of the current index.
716
- */
717
- while (1 ) {
718
- struct cache_entry * ce ;
719
- ce = next_cache_entry (o );
720
- if (!ce )
721
- break ;
722
- /* Is the entry still in that directory? */
723
- if (do_compare_entry (ce , info , names ))
724
- break ;
725
- /*
726
- * Note: we do not just run unpack_index_entry() here,
727
- * as the callback may want to compare what is in the
728
- * index with what are from the HEAD and the other tree
729
- * and reject the merge. We pretend that ancestors, the
730
- * HEAD and the other tree all have the same contents as
731
- * the current index, which is a lie, but it works.
732
- */
733
- for (i = 0 ; i < n + 1 ; i ++ )
734
- src [i ] = ce ;
735
- mark_ce_used (ce , o );
736
- if (call_unpack_fn (src , o ) < 0 )
737
- return unpack_failed (o , NULL );
738
- if (ce_stage (ce ))
739
- mark_ce_used_same_name (ce , o );
740
- }
741
- return dirmask ;
742
- }
743
-
744
688
static void debug_path (struct traverse_info * info )
745
689
{
746
690
if (info -> prev ) {
0 commit comments