On Wed, Jul 13, 2011 at 09:04, Jeff King <peff@xxxxxxxx> wrote: > diff --git a/metadata-cache.c b/metadata-cache.c > new file mode 100644 > index 0000000..e2e5ff8 > --- /dev/null > +++ b/metadata-cache.c > @@ -0,0 +1,337 @@ > +#include "cache.h" > +#include "metadata-cache.h" > +#include "sha1-lookup.h" > +#include "object.h" > + > +static struct metadata_cache **autowrite; > +static int autowrite_nr; > +static int autowrite_alloc; > + > +static int installed_atexit_autowriter; > + > +static int record_size(const struct metadata_cache *c) > +{ > + /* a record is a 20-byte sha1 plus the width of the value */ > + return c->mem.width + 20; You are circumventing your own API. Why do you don't use the decoration_width() accessor here? I don't see any check that METADATA_CACHE_INIT("frotz", 0, NULL) is invalid neither in the documentation nor in the code. > +} > + Bert -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html