Skip to content

Commit 27912a0

Browse files
bk2204peff
authored andcommitted
push_refs_with_export: convert to struct object_id
Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent e96b16c commit 27912a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

transport-helper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,13 +878,13 @@ static int push_refs_with_export(struct transport *transport,
878878

879879
for (ref = remote_refs; ref; ref = ref->next) {
880880
char *private;
881-
unsigned char sha1[20];
881+
struct object_id oid;
882882

883883
private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
884-
if (private && !get_sha1(private, sha1)) {
884+
if (private && !get_sha1(private, oid.hash)) {
885885
strbuf_addf(&buf, "^%s", private);
886886
string_list_append(&revlist_args, strbuf_detach(&buf, NULL));
887-
hashcpy(ref->old_oid.hash, sha1);
887+
oidcpy(&ref->old_oid, &oid);
888888
}
889889
free(private);
890890

@@ -898,7 +898,7 @@ static int push_refs_with_export(struct transport *transport,
898898
name = resolve_ref_unsafe(
899899
ref->peer_ref->name,
900900
RESOLVE_REF_READING,
901-
sha1, &flag);
901+
oid.hash, &flag);
902902
if (!name || !(flag & REF_ISSYMREF))
903903
name = ref->peer_ref->name;
904904

0 commit comments

Comments
 (0)