Re: [PATCH JGIT 2/5] FileMode: Store bit masks in int constants

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

 



Jonas Fonseca <fonseca@xxxxxxx> wrote:
> +	public static final int TYPE_MASK = 0170000;
> +	public static final int TREE_MASK = 0040000;
> +	public static final int SYMLINK_MASK = 0120000;
> +	public static final int FILE_MASK = 0100000;
> +	public static final int GITLINK_MASK = 0160000;
> +	public static final int MISSING_MASK = 0000000;

These last 5 entries aren't masks, they are type codes.  I'd rather
they be called FOO_TYPE than FOO_MASK.  In particular what is really
troubling is MISSING_MASK, being all 0 it always destroys the input
and then matches everything.  :-)

I'm going to amend this name change in here, s/_MASK/_TYPE/ on the
last 5 fields.

-- 
Shawn.
--
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

[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]