Skip to content

Commit

Permalink
push_refs_with_export: convert to struct object_id
Browse files Browse the repository at this point in the history
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
  • Loading branch information
brian m. carlson authored and Jeff King committed Nov 20, 2015
1 parent e96b16c commit 27912a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,13 +878,13 @@ static int push_refs_with_export(struct transport *transport,

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

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

Expand All @@ -898,7 +898,7 @@ static int push_refs_with_export(struct transport *transport,
name = resolve_ref_unsafe(
ref->peer_ref->name,
RESOLVE_REF_READING,
sha1, &flag);
oid.hash, &flag);
if (!name || !(flag & REF_ISSYMREF))
name = ref->peer_ref->name;

Expand Down

0 comments on commit 27912a0

Please sign in to comment.