@@ -551,18 +551,18 @@ static int has_remote(const char *refname, const struct object_id *oid,
551551 return 1 ;
552552}
553553
554- static int append_sha1_to_argv (const unsigned char sha1 [ 20 ] , void * data )
554+ static int append_oid_to_argv (const struct object_id * oid , void * data )
555555{
556556 struct argv_array * argv = data ;
557- argv_array_push (argv , sha1_to_hex ( sha1 ));
557+ argv_array_push (argv , oid_to_hex ( oid ));
558558 return 0 ;
559559}
560560
561- static int check_has_commit (const unsigned char sha1 [ 20 ] , void * data )
561+ static int check_has_commit (const struct object_id * oid , void * data )
562562{
563563 int * has_commit = data ;
564564
565- if (!lookup_commit_reference (sha1 ))
565+ if (!lookup_commit_reference (oid -> hash ))
566566 * has_commit = 0 ;
567567
568568 return 0 ;
@@ -601,7 +601,7 @@ static int submodule_needs_pushing(const char *path, struct sha1_array *commits)
601601 int needs_pushing = 0 ;
602602
603603 argv_array_push (& cp .args , "rev-list" );
604- sha1_array_for_each_unique (commits , append_sha1_to_argv , & cp .args );
604+ sha1_array_for_each_unique (commits , append_oid_to_argv , & cp .args );
605605 argv_array_pushl (& cp .args , "--not" , "--remotes" , "-n" , "1" , NULL );
606606
607607 prepare_submodule_repo_env (& cp .env_array );
@@ -687,7 +687,7 @@ int find_unpushed_submodules(struct sha1_array *commits,
687687
688688 /* argv.argv[0] will be ignored by setup_revisions */
689689 argv_array_push (& argv , "find_unpushed_submodules" );
690- sha1_array_for_each_unique (commits , append_sha1_to_argv , & argv );
690+ sha1_array_for_each_unique (commits , append_oid_to_argv , & argv );
691691 argv_array_push (& argv , "--not" );
692692 argv_array_pushf (& argv , "--remotes=%s" , remotes_name );
693693
@@ -831,9 +831,9 @@ void check_for_new_submodule_commits(struct object_id *oid)
831831 sha1_array_append (& ref_tips_after_fetch , oid );
832832}
833833
834- static int add_sha1_to_argv (const unsigned char sha1 [ 20 ] , void * data )
834+ static int add_oid_to_argv (const struct object_id * oid , void * data )
835835{
836- argv_array_push (data , sha1_to_hex ( sha1 ));
836+ argv_array_push (data , oid_to_hex ( oid ));
837837 return 0 ;
838838}
839839
@@ -850,10 +850,10 @@ static void calculate_changed_submodule_paths(void)
850850 init_revisions (& rev , NULL );
851851 argv_array_push (& argv , "--" ); /* argv[0] program name */
852852 sha1_array_for_each_unique (& ref_tips_after_fetch ,
853- add_sha1_to_argv , & argv );
853+ add_oid_to_argv , & argv );
854854 argv_array_push (& argv , "--not" );
855855 sha1_array_for_each_unique (& ref_tips_before_fetch ,
856- add_sha1_to_argv , & argv );
856+ add_oid_to_argv , & argv );
857857 setup_revisions (argv .argc , argv .argv , & rev , NULL );
858858 if (prepare_revision_walk (& rev ))
859859 die ("revision walk setup failed" );
0 commit comments