Re: [PATCH 01/10] add: do not rely on dtype being NULL behavior

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

 



On Wed, Nov 17, 2010 at 1:58 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> 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?

It fails. I realized that just this week unfortunately. That commit is
reverted in this series.

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

Yes.
-- 
Duy
--
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]