Re: [PATCH] status: report ignored yet tracked directories

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

 



On 05.01.13 21:42, Antoine Pelisse wrote:
> Tracked directories (i.e. directories containing tracked files) that
> are ignored must be reported as ignored if they contain untracked files.
>
> Currently, tracked files or directories can't be reported untracked or ignored.
> Remove that constraint when searching ignored files.
>
> Signed-off-by: Antoine Pelisse <apelisse@xxxxxxxxx>
> ---
> Torsten, Jeff,
>
> Can you please test this patch and tell me if this is better ? (t7061 is now
> successful with core.ignorecase=true)
>
> This patch applies on top of ap/status-ignored-in-ignored-directory (but
>  should also apply cleanly on top of next for testing purpose).
>
> Thanks,
>
>  dir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/dir.c b/dir.c
> index 9b80348..eefa8ab 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -672,7 +672,8 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
>
>  static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
>  {
> -	if (cache_name_exists(pathname, len, ignore_case))
> +	if (!(dir->flags & DIR_SHOW_IGNORED) &&
> +	    cache_name_exists(pathname, len, ignore_case))
>  		return NULL;
>
>  	ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
> --
> 1.7.12.4.2.geb8c5b8.dirty
>
(BTW: thanks for contributing to git)
Antoine, the test is OK:
# passed all 10 test(s)
================
I'm not sure if I am happy with the commit message, so I try to have an improved
version below, which may be a starting point for a discussion:

git status: report ignored directories correctly

A directory containing tracked files where the directory
is ignored must be reported as ignored even if it contains untracked files.

/Torsten


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