@@ -614,7 +614,7 @@ static int compare_ofs_delta_bases(off_t offset1, off_t offset2,
614
614
0 ;
615
615
}
616
616
617
- static int find_ofs_delta (const off_t offset , enum object_type type )
617
+ static int find_ofs_delta (const off_t offset )
618
618
{
619
619
int first = 0 , last = nr_ofs_deltas ;
620
620
@@ -624,7 +624,8 @@ static int find_ofs_delta(const off_t offset, enum object_type type)
624
624
int cmp ;
625
625
626
626
cmp = compare_ofs_delta_bases (offset , delta -> offset ,
627
- type , objects [delta -> obj_no ].type );
627
+ OBJ_OFS_DELTA ,
628
+ objects [delta -> obj_no ].type );
628
629
if (!cmp )
629
630
return next ;
630
631
if (cmp < 0 ) {
@@ -637,10 +638,9 @@ static int find_ofs_delta(const off_t offset, enum object_type type)
637
638
}
638
639
639
640
static void find_ofs_delta_children (off_t offset ,
640
- int * first_index , int * last_index ,
641
- enum object_type type )
641
+ int * first_index , int * last_index )
642
642
{
643
- int first = find_ofs_delta (offset , type );
643
+ int first = find_ofs_delta (offset );
644
644
int last = first ;
645
645
int end = nr_ofs_deltas - 1 ;
646
646
@@ -668,7 +668,7 @@ static int compare_ref_delta_bases(const struct object_id *oid1,
668
668
return oidcmp (oid1 , oid2 );
669
669
}
670
670
671
- static int find_ref_delta (const struct object_id * oid , enum object_type type )
671
+ static int find_ref_delta (const struct object_id * oid )
672
672
{
673
673
int first = 0 , last = nr_ref_deltas ;
674
674
@@ -678,7 +678,8 @@ static int find_ref_delta(const struct object_id *oid, enum object_type type)
678
678
int cmp ;
679
679
680
680
cmp = compare_ref_delta_bases (oid , & delta -> oid ,
681
- type , objects [delta -> obj_no ].type );
681
+ OBJ_REF_DELTA ,
682
+ objects [delta -> obj_no ].type );
682
683
if (!cmp )
683
684
return next ;
684
685
if (cmp < 0 ) {
@@ -691,10 +692,9 @@ static int find_ref_delta(const struct object_id *oid, enum object_type type)
691
692
}
692
693
693
694
static void find_ref_delta_children (const struct object_id * oid ,
694
- int * first_index , int * last_index ,
695
- enum object_type type )
695
+ int * first_index , int * last_index )
696
696
{
697
- int first = find_ref_delta (oid , type );
697
+ int first = find_ref_delta (oid );
698
698
int last = first ;
699
699
int end = nr_ref_deltas - 1 ;
700
700
@@ -983,12 +983,10 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
983
983
{
984
984
if (base -> ref_last == -1 && base -> ofs_last == -1 ) {
985
985
find_ref_delta_children (& base -> obj -> idx .oid ,
986
- & base -> ref_first , & base -> ref_last ,
987
- OBJ_REF_DELTA );
986
+ & base -> ref_first , & base -> ref_last );
988
987
989
988
find_ofs_delta_children (base -> obj -> idx .offset ,
990
- & base -> ofs_first , & base -> ofs_last ,
991
- OBJ_OFS_DELTA );
989
+ & base -> ofs_first , & base -> ofs_last );
992
990
993
991
if (base -> ref_last == -1 && base -> ofs_last == -1 ) {
994
992
free (base -> data );
0 commit comments