Skip to content

Commit 8694769

Browse files
rscharfegitster
authored andcommitted
use oidcpy() for copying hashes between instances of struct object_id
Patch generated by Coccinelle and contrib/coccinelle/object_id.cocci. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2490574 commit 8694769

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

refs/files-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static int cache_ref_iterator_peel(struct ref_iterator *ref_iterator,
697697

698698
if (peel_entry(entry, 0))
699699
return -1;
700-
hashcpy(peeled->hash, entry->u.value.peeled.hash);
700+
oidcpy(peeled, &entry->u.value.peeled);
701701
return 0;
702702
}
703703

wt-status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s)
628628
d->index_status = DIFF_STATUS_ADDED;
629629
/* Leave {mode,oid}_head zero for adds. */
630630
d->mode_index = ce->ce_mode;
631-
hashcpy(d->oid_index.hash, ce->oid.hash);
631+
oidcpy(&d->oid_index, &ce->oid);
632632
}
633633
}
634634
}
@@ -2096,7 +2096,7 @@ static void wt_porcelain_v2_print_unmerged_entry(
20962096
if (strcmp(ce->name, it->string) || !stage)
20972097
break;
20982098
stages[stage - 1].mode = ce->ce_mode;
2099-
hashcpy(stages[stage - 1].oid.hash, ce->oid.hash);
2099+
oidcpy(&stages[stage - 1].oid, &ce->oid);
21002100
sum |= (1 << (stage - 1));
21012101
}
21022102
if (sum != d->stagemask)

0 commit comments

Comments
 (0)