aboutsummaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:20 +0000
committerJeff King <peff@peff.net>2015-11-20 08:02:05 -0500
commitf4e54d02b894064d370e461385b48701485672bd (patch)
treec6e25d995009bbe422f87a2da72ed5d5b2098ced /remote-curl.c
parentb419aa25d5622268f515b26e76420eb2dd89e7e6 (diff)
downloadgit-f4e54d02b894064d370e461385b48701485672bd.tar.gz
git-f4e54d02b894064d370e461385b48701485672bd.tar.xz
Convert struct ref to use object_id.
Use struct object_id in three fields in struct ref and convert all the necessary places that use it. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/remote-curl.c b/remote-curl.c
index cc7a8a66f..bc3af79e4 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -169,7 +169,7 @@ static struct ref *parse_info_refs(struct discovery *heads)
data[i] = 0;
ref_name = mid + 1;
ref = alloc_ref(ref_name);
- get_sha1_hex(start, ref->old_sha1);
+ get_oid_hex(start, &ref->old_oid);
if (!refs)
refs = ref;
if (last_ref)
@@ -348,7 +348,7 @@ static void output_refs(struct ref *refs)
if (posn->symref)
printf("@%s %s\n", posn->symref, posn->name);
else
- printf("%s %s\n", sha1_to_hex(posn->old_sha1), posn->name);
+ printf("%s %s\n", oid_to_hex(&posn->old_oid), posn->name);
}
printf("\n");
fflush(stdout);
@@ -702,7 +702,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
if (options.depth)
die("dumb http transport does not support --depth");
for (i = 0; i < nr_heads; i++)
- targets[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1));
+ targets[i] = xstrdup(oid_to_hex(&to_fetch[i]->old_oid));
walker = get_http_walker(url.buf);
walker->get_all = 1;
@@ -763,7 +763,7 @@ static int fetch_git(struct discovery *heads,
if (!*ref->name)
die("cannot fetch by sha1 over smart http");
packet_buf_write(&preamble, "%s %s\n",
- sha1_to_hex(ref->old_sha1), ref->name);
+ oid_to_hex(&ref->old_oid), ref->name);
}
packet_buf_flush(&preamble);
@@ -815,7 +815,7 @@ static void parse_fetch(struct strbuf *buf)
die("protocol error: expected sha/ref, got %s'", p);
ref = alloc_ref(name);
- hashcpy(ref->old_sha1, old_sha1);
+ hashcpy(ref->old_oid.hash, old_sha1);
*list = ref;
list = &ref->next;