coccinelle: apply object_id Coccinelle transformations

Apply the set of semantic patches from contrib/coccinelle to convert
some leftover places using struct object_id's hash member to instead
use the wrapper functions that take struct object_id natively.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2016-06-24 23:09:22 +00:00
committed by Junio C Hamano
parent f449198e58
commit c368dde924
3 changed files with 9 additions and 10 deletions

View File

@ -1725,14 +1725,14 @@ static int verify_lock(struct ref_lock *lock,
errno = save_errno;
return -1;
} else {
hashclr(lock->old_oid.hash);
oidclr(&lock->old_oid);
return 0;
}
}
if (old_sha1 && hashcmp(lock->old_oid.hash, old_sha1)) {
strbuf_addf(err, "ref %s is at %s but expected %s",
lock->ref_name,
sha1_to_hex(lock->old_oid.hash),
oid_to_hex(&lock->old_oid),
sha1_to_hex(old_sha1));
errno = EBUSY;
return -1;