ref-filter: add objectsize to used_atom
authorZheNing Hu <adlternative@gmail.com>
Thu, 13 May 2021 15:15:37 +0000 (15:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 May 2021 21:37:27 +0000 (06:37 +0900)
commit0caf20f22806dfd478ab3ac26b5f3682f383d3b4
tree83595bc4c78dae49c7d97ee434effc3dfffc0499
parentdf6c4f722c94641d5a9ea5496511f7043433abc2
ref-filter: add objectsize to used_atom

When the support for "objectsize:disk" was bolted onto the
existing support for "objectsize", it didn't follow the
usual pattern for handling "atomtype:modifier", which reads
the <modifier> part just once while parsing the format
string, and store the parsed result in the union in the
used_atom structure, so that the string form of it does not
have to be parsed over and over at runtime (e.g. in
grab_common_values()).

Add a new member `objectsize` to the union `used_atom.u`,
so that we can separate the check of <modifier> from the
check of <atomtype>, this will bring scalability to atom
`%(objectsize)`.

Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c