Thread (1 message) 1 message, 1 author, 2020-05-05

Re: [PATCH 3/4] pack-bitmap.c: support 'tree:0' filtering

From: Junio C Hamano <hidden>
Date: 2020-05-05 18:20:27

Taylor Blau [off-list ref] writes:
I think we need some sort of guard here, since we could receive any
value of object_type, but you're right that this isn't the right one. It
should probably be something like:

  if (type < OBJ_COMMIT || type > OBJ_TAG)

to pick out the sentinel values like OBJ_BAD and OBJ_NONE, as well as
the pack-specific types, like OBJ_OFS_DELTA and so on.
Yeah, it looked strange to start checking for OBJ_BLOB and OBJ_TREE
in commits that starts passing these types to the function, while
the code in the function was prepared to take any valid type, so
using the above condition from the get-go would probably be a lot
more sensible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help