> If you think the switch is dirty, you can use `type` to get the free pointer from `git_object_table`.

I thought about that (I agree that the extra size sucks). But since the object table maps to `GIT_OBJ` values, there isn't a great place to put the `git_odb_object_free` callback. I guess I can still get a nice simplification in `git_cached_obj_decref` and eliminate the `git_object_free` switch without adding this in.