@@ -501,7 +501,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
501
501
if (ref_exists (truname .buf )) {
502
502
strbuf_addf (msg ,
503
503
"%s\t\tbranch '%s'%s of .\n" ,
504
- sha1_to_hex ( remote_head -> object .oid . hash ),
504
+ oid_to_hex ( & remote_head -> object .oid ),
505
505
truname .buf + 11 ,
506
506
(early ? " (early part)" : "" ));
507
507
strbuf_release (& truname );
@@ -515,15 +515,15 @@ static void merge_name(const char *remote, struct strbuf *msg)
515
515
desc = merge_remote_util (remote_head );
516
516
if (desc && desc -> obj && desc -> obj -> type == OBJ_TAG ) {
517
517
strbuf_addf (msg , "%s\t\t%s '%s'\n" ,
518
- sha1_to_hex ( desc -> obj -> oid . hash ),
518
+ oid_to_hex ( & desc -> obj -> oid ),
519
519
typename (desc -> obj -> type ),
520
520
remote );
521
521
goto cleanup ;
522
522
}
523
523
}
524
524
525
525
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 );
527
527
cleanup :
528
528
strbuf_release (& buf );
529
529
strbuf_release (& bname );
@@ -1366,7 +1366,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1366
1366
for (p = remoteheads ; p ; p = p -> next ) {
1367
1367
struct commit * commit = p -> item ;
1368
1368
strbuf_addf (& buf , "GITHEAD_%s" ,
1369
- sha1_to_hex ( commit -> object .oid . hash ));
1369
+ oid_to_hex ( & commit -> object .oid ));
1370
1370
setenv (buf .buf , merge_remote_util (commit )-> name , 1 );
1371
1371
strbuf_reset (& buf );
1372
1372
if (fast_forward != FF_ONLY &&
@@ -1425,7 +1425,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1425
1425
goto done ;
1426
1426
} else if (fast_forward != FF_NO && !remoteheads -> next &&
1427
1427
!common -> next &&
1428
- !hashcmp ( common -> item -> object .oid . hash , head_commit -> object .oid . hash )) {
1428
+ !oidcmp ( & common -> item -> object .oid , & head_commit -> object .oid )) {
1429
1429
/* Again the most common case of merging one remote. */
1430
1430
struct strbuf msg = STRBUF_INIT ;
1431
1431
struct commit * commit ;
@@ -1499,8 +1499,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1499
1499
* HEAD^^" would be missed.
1500
1500
*/
1501
1501
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 )) {
1504
1503
up_to_date = 0 ;
1505
1504
break ;
1506
1505
}
@@ -1530,7 +1529,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1530
1529
* Stash away the local changes so that we can try more than one.
1531
1530
*/
1532
1531
save_state (stash ))
1533
- hashcpy (stash , null_sha1 );
1532
+ hashclr (stash );
1534
1533
1535
1534
for (i = 0 ; i < use_strategies_nr ; i ++ ) {
1536
1535
int ret ;
0 commit comments