diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:55 -0700 |
commit | df422678a800ffb1db8f3f146e2786f1cbf0059b (patch) | |
tree | 893f5099c5d03859d6e21c1b7eb4f501462b9431 /remote.c | |
parent | 3943f6caaa7613145448ebdca181e1feaf941a02 (diff) | |
parent | ac53fe860147636cd8671efe26bd002a6cb5cd13 (diff) | |
download | git-df422678a800ffb1db8f3f146e2786f1cbf0059b.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |