From: Junio C Hamano Date: Tue, 16 Nov 2010 18:58:17 GMT Subject: Re: [PATCH 01/10] add: do not rely on dtype being NULL behavior Message-ID: <7v39r1hz92.fsf@alter.siamese.dyndns.org> In-Reply-To: Nguyen Thai Ngoc Duy writes: > Hmm.. get_index_dtype() would return DT_DIR if the submodule exists in > index. If it does not it must be a directory in worktree, right? > Call flow: excluded_from_list() -> get_dtype() -> get_index_dtype() By the way, your c84de70 (excluded_1(): support exclude files in index, 2009-08-20) looks broken. What happens when the exclude pattern wants a directory but specifies it with a wildcard? The safest and sanest first step is to just change DT_UNKNOWN (which clearly is a wrong thing to pass) to NULL to keep the current behaviour, but it probably makes more sense to do the second step at the same time to pass a pointer to an int that holds DT_UNKNOWN to avoid triggering that broken codepath.