notes-cache: convert to struct object_id
Convert as many instances of unsigned char [20] as possible. Update the callers of notes_cache_get and notes_cache_put to use the new interface. Among the functions updated are callers of lookup_commit_reference_gently, which we will soon convert. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
71f35d5cbc
commit
569aa376ea
4
diff.c
4
diff.c
@ -5244,7 +5244,7 @@ size_t fill_textconv(struct userdiff_driver *driver,
|
||||
|
||||
if (driver->textconv_cache && df->oid_valid) {
|
||||
*outbuf = notes_cache_get(driver->textconv_cache,
|
||||
df->oid.hash,
|
||||
&df->oid,
|
||||
&size);
|
||||
if (*outbuf)
|
||||
return size;
|
||||
@ -5256,7 +5256,7 @@ size_t fill_textconv(struct userdiff_driver *driver,
|
||||
|
||||
if (driver->textconv_cache && df->oid_valid) {
|
||||
/* ignore errors, as we might be in a readonly repository */
|
||||
notes_cache_put(driver->textconv_cache, df->oid.hash, *outbuf,
|
||||
notes_cache_put(driver->textconv_cache, &df->oid, *outbuf,
|
||||
size);
|
||||
/*
|
||||
* we could save up changes and flush them all at the end,
|
||||
|
Reference in New Issue
Block a user