summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:24 (GMT)
committerJeff King <peff@peff.net>2015-11-20 13:02:05 (GMT)
commit27912a03fd6dc2c8111e328d9ac1a28994fe36d2 (patch)
tree0a1bfe537dbedb06a4caad08a4773713a24ff9f9
parente96b16cc2a1920ab8349a58e2501a3d30818f9e9 (diff)
downloadgit-27912a03fd6dc2c8111e328d9ac1a28994fe36d2.zip
git-27912a03fd6dc2c8111e328d9ac1a28994fe36d2.tar.gz
git-27912a03fd6dc2c8111e328d9ac1a28994fe36d2.tar.bz2
push_refs_with_export: convert to struct object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
-rw-r--r--transport-helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 91cb0e7..0eb3cf0 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -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);
@@ -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;