From: Shawn O. Pearce Date: Wed, 12 Aug 2009 15:22:52 GMT Subject: Re: [PATCH JGIT 2/5] FileMode: Store bit masks in int constants Message-ID: <20090812152252.GE1033@spearce.org> In-Reply-To: <1250089776-22895-1-git-send-email-fonseca@diku.dk> Jonas Fonseca 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.