Re: [PATCH 3/3] sparse checkout: do not eagerly decide the fate for whole directory
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:12
Nguyễn Thái Ngọc Duy [off-list ref] writes:
Sparse-setting code follows closely how files are excluded in read_directory(), every entry (including directories) are fed to excluded_from_list() to decide if the entry is suitable. Directories are treated no different than files. If a directory is matched (or not), the whole directory is considered matched (or not) and the process moves on. This generally works as long as there are no patterns to exclude parts of the directory. In case of sparse checkout code, the following patterns t !t/t0000-basic.sh will produce a worktree with full directory "t" even if t0000-basic.sh is requested to stay out.
That roughly corresponds to having
!t
t/t0000-basic.sh
in gitignore mechanism, right? Generally t/ is not to be excluded, but
only t0000-basic.sh should be. Sounds like a right thing to do.
Noticed-by: [off-list ref] Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> --- Fix some comments as Thiago suggested. 1/3 of this series should be dropped apparently.
I am not quite sure what to do with this patch though. You marked this as 3/3 without saying anything about where 1 and 2 are (or if they even exist). You hint there is a 1 that should be dropped here. Is this a re-rolled round, and if so where are the previous ones? Could you make things easier to find (just saying something like [PATCH v2 3/3] in the Subject: is good enough) next time?