@@ -831,7 +831,7 @@ static int command_singleton_iterator(void *cb_data, unsigned char sha1[20]);
831831static int update_shallow_ref (struct command * cmd , struct shallow_info * si )
832832{
833833 static struct lock_file shallow_lock ;
834- struct sha1_array extra = SHA1_ARRAY_INIT ;
834+ struct oid_array extra = OID_ARRAY_INIT ;
835835 struct check_connected_options opt = CHECK_CONNECTED_INIT ;
836836 uint32_t mask = 1 << (cmd -> index % 32 );
837837 int i ;
@@ -842,13 +842,13 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
842842 if (si -> used_shallow [i ] &&
843843 (si -> used_shallow [i ][cmd -> index / 32 ] & mask ) &&
844844 !delayed_reachability_test (si , i ))
845- sha1_array_append (& extra , & si -> shallow -> oid [i ]);
845+ oid_array_append (& extra , & si -> shallow -> oid [i ]);
846846
847847 opt .env = tmp_objdir_env (tmp_objdir );
848848 setup_alternate_shallow (& shallow_lock , & opt .shallow_file , & extra );
849849 if (check_connected (command_singleton_iterator , cmd , & opt )) {
850850 rollback_lock_file (& shallow_lock );
851- sha1_array_clear (& extra );
851+ oid_array_clear (& extra );
852852 return -1 ;
853853 }
854854
@@ -862,7 +862,7 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
862862 register_shallow (extra .oid [i ].hash );
863863
864864 si -> shallow_ref [cmd -> index ] = 0 ;
865- sha1_array_clear (& extra );
865+ oid_array_clear (& extra );
866866 return 0 ;
867867}
868868
@@ -1529,7 +1529,7 @@ static void queue_commands_from_cert(struct command **tail,
15291529 }
15301530}
15311531
1532- static struct command * read_head_info (struct sha1_array * shallow )
1532+ static struct command * read_head_info (struct oid_array * shallow )
15331533{
15341534 struct command * commands = NULL ;
15351535 struct command * * p = & commands ;
@@ -1546,7 +1546,7 @@ static struct command *read_head_info(struct sha1_array *shallow)
15461546 if (get_oid_hex (line + 8 , & oid ))
15471547 die ("protocol error: expected shallow sha, got '%s'" ,
15481548 line + 8 );
1549- sha1_array_append (shallow , & oid );
1549+ oid_array_append (shallow , & oid );
15501550 continue ;
15511551 }
15521552
@@ -1804,7 +1804,7 @@ static void prepare_shallow_update(struct command *commands,
18041804
18051805static void update_shallow_info (struct command * commands ,
18061806 struct shallow_info * si ,
1807- struct sha1_array * ref )
1807+ struct oid_array * ref )
18081808{
18091809 struct command * cmd ;
18101810 int * ref_status ;
@@ -1817,7 +1817,7 @@ static void update_shallow_info(struct command *commands,
18171817 for (cmd = commands ; cmd ; cmd = cmd -> next ) {
18181818 if (is_null_oid (& cmd -> new_oid ))
18191819 continue ;
1820- sha1_array_append (ref , & cmd -> new_oid );
1820+ oid_array_append (ref , & cmd -> new_oid );
18211821 cmd -> index = ref -> nr - 1 ;
18221822 }
18231823 si -> ref = ref ;
@@ -1878,8 +1878,8 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
18781878{
18791879 int advertise_refs = 0 ;
18801880 struct command * commands ;
1881- struct sha1_array shallow = SHA1_ARRAY_INIT ;
1882- struct sha1_array ref = SHA1_ARRAY_INIT ;
1881+ struct oid_array shallow = OID_ARRAY_INIT ;
1882+ struct oid_array ref = OID_ARRAY_INIT ;
18831883 struct shallow_info si ;
18841884
18851885 struct option options [] = {
@@ -1971,8 +1971,8 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
19711971 }
19721972 if (use_sideband )
19731973 packet_flush (1 );
1974- sha1_array_clear (& shallow );
1975- sha1_array_clear (& ref );
1974+ oid_array_clear (& shallow );
1975+ oid_array_clear (& ref );
19761976 free ((void * )push_cert_nonce );
19771977 return 0 ;
19781978}
0 commit comments