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
This commit is contained in:
8
remote.c
8
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;
|
||||
|
Reference in New Issue
Block a user