aboutsummaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:55 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-11 13:26:55 -0700
commitdf422678a800ffb1db8f3f146e2786f1cbf0059b (patch)
tree893f5099c5d03859d6e21c1b7eb4f501462b9431 /remote.c
parent3943f6caaa7613145448ebdca181e1feaf941a02 (diff)
parentac53fe860147636cd8671efe26bd002a6cb5cd13 (diff)
downloadgit-df422678a800ffb1db8f3f146e2786f1cbf0059b.tar.gz
git-df422678a800ffb1db8f3f146e2786f1cbf0059b.tar.xz
Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: sha1_name: convert uses of 40 to GIT_SHA1_HEXSZ sha1_name: convert GET_SHA1* flags to GET_OID* sha1_name: convert get_sha1* to get_oid* Convert remaining callers of get_sha1 to get_oid. builtin/unpack-file: convert to struct object_id bisect: convert bisect_checkout to struct object_id builtin/update_ref: convert to struct object_id sequencer: convert to struct object_id remote: convert struct push_cas to struct object_id submodule: convert submodule config lookup to use object_id builtin/merge-tree: convert remaining caller of get_sha1 to object_id builtin/fsck: convert remaining caller of get_sha1 to object_id
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/remote.c b/remote.c
index 60d004392..6a1be31bb 100644
--- a/remote.c
+++ b/remote.c
@@ -1081,7 +1081,7 @@ static int try_explicit_object_name(const char *name,
return 0;
}
- if (get_sha1(name, oid.hash))
+ if (get_oid(name, &oid))
return -1;
if (match) {
@@ -2297,8 +2297,8 @@ static int parse_push_cas_option(struct push_cas_option *cas, const char *arg, i
if (!*colon)
entry->use_tracking = 1;
else if (!colon[1])
- hashclr(entry->expect);
- else if (get_sha1(colon + 1, entry->expect))
+ oidclr(&entry->expect);
+ else if (get_oid(colon + 1, &entry->expect))
return error("cannot parse expected object name '%s'", colon + 1);
return 0;
}
@@ -2345,7 +2345,7 @@ static void apply_cas(struct push_cas_option *cas,
continue;
ref->expect_old_sha1 = 1;
if (!entry->use_tracking)
- hashcpy(ref->old_oid_expect.hash, cas->entry[i].expect);
+ oidcpy(&ref->old_oid_expect, &entry->expect);
else if (remote_tracking(remote, ref->name, &ref->old_oid_expect))
oidclr(&ref->old_oid_expect);
return;