diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-07-13 23:49:21 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 13:54:38 -0700 |
commit | b8566f8ff9773c1a3a7f47e9b205cd08b2ad6747 (patch) | |
tree | f72c58bd5e6e665962765a34351c6faa8ed63209 /remote.c | |
parent | cd73de47148c16760a62fa3f75cafe015ca764b2 (diff) | |
download | git-b8566f8ff9773c1a3a7f47e9b205cd08b2ad6747.tar.gz |
remote: convert struct push_cas to struct object_id
This gets rid of one use of get_sha1.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2294,8 +2294,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; } @@ -2342,7 +2342,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; |