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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Taylor Blau <me@xxxxxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux