@@ -501,7 +501,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
501501 if (ref_exists (truname .buf )) {
502502 strbuf_addf (msg ,
503503 "%s\t\tbranch '%s'%s of .\n" ,
504- sha1_to_hex ( remote_head -> object .oid . hash ),
504+ oid_to_hex ( & remote_head -> object .oid ),
505505 truname .buf + 11 ,
506506 (early ? " (early part)" : "" ));
507507 strbuf_release (& truname );
@@ -515,15 +515,15 @@ static void merge_name(const char *remote, struct strbuf *msg)
515515 desc = merge_remote_util (remote_head );
516516 if (desc && desc -> obj && desc -> obj -> type == OBJ_TAG ) {
517517 strbuf_addf (msg , "%s\t\t%s '%s'\n" ,
518- sha1_to_hex ( desc -> obj -> oid . hash ),
518+ oid_to_hex ( & desc -> obj -> oid ),
519519 typename (desc -> obj -> type ),
520520 remote );
521521 goto cleanup ;
522522 }
523523 }
524524
525525 strbuf_addf (msg , "%s\t\tcommit '%s'\n" ,
526- sha1_to_hex ( remote_head -> object .oid . hash ), remote );
526+ oid_to_hex ( & remote_head -> object .oid ), remote );
527527cleanup :
528528 strbuf_release (& buf );
529529 strbuf_release (& bname );
@@ -1366,7 +1366,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
13661366 for (p = remoteheads ; p ; p = p -> next ) {
13671367 struct commit * commit = p -> item ;
13681368 strbuf_addf (& buf , "GITHEAD_%s" ,
1369- sha1_to_hex ( commit -> object .oid . hash ));
1369+ oid_to_hex ( & commit -> object .oid ));
13701370 setenv (buf .buf , merge_remote_util (commit )-> name , 1 );
13711371 strbuf_reset (& buf );
13721372 if (fast_forward != FF_ONLY &&
@@ -1425,7 +1425,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
14251425 goto done ;
14261426 } else if (fast_forward != FF_NO && !remoteheads -> next &&
14271427 !common -> next &&
1428- !hashcmp ( common -> item -> object .oid . hash , head_commit -> object .oid . hash )) {
1428+ !oidcmp ( & common -> item -> object .oid , & head_commit -> object .oid )) {
14291429 /* Again the most common case of merging one remote. */
14301430 struct strbuf msg = STRBUF_INIT ;
14311431 struct commit * commit ;
@@ -1499,8 +1499,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
14991499 * HEAD^^" would be missed.
15001500 */
15011501 common_one = get_merge_bases (head_commit , j -> item );
1502- if (hashcmp (common_one -> item -> object .oid .hash ,
1503- j -> item -> object .oid .hash )) {
1502+ if (oidcmp (& common_one -> item -> object .oid , & j -> item -> object .oid )) {
15041503 up_to_date = 0 ;
15051504 break ;
15061505 }
@@ -1530,7 +1529,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
15301529 * Stash away the local changes so that we can try more than one.
15311530 */
15321531 save_state (stash ))
1533- hashcpy (stash , null_sha1 );
1532+ hashclr (stash );
15341533
15351534 for (i = 0 ; i < use_strategies_nr ; i ++ ) {
15361535 int ret ;
0 commit comments