git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Antoine Pelisse <apelisse@gmail.com>
Cc: tboegi@web.de, peff@peff.net, git@vger.kernel.org
Subject: Re: [PATCH] status: report ignored yet tracked directories
Date: Sat, 05 Jan 2013 22:27:35 +0100	[thread overview]
Message-ID: <50E89AC7.9070600@web.de> (raw)
In-Reply-To: <1357418563-6626-1-git-send-email-apelisse@gmail.com>

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@gmail.com>
> ---
> 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

  reply	other threads:[~2013-01-05 21:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05 11:07 t7061: comments and one failure Torsten Bögershausen
2013-01-05 11:24 ` Jeff King
2013-01-05 11:29   ` Antoine Pelisse
2013-01-05 20:42   ` [PATCH] status: report ignored yet tracked directories Antoine Pelisse
2013-01-05 21:27     ` Torsten Bögershausen [this message]
2013-01-05 23:03     ` Jeff King
2013-01-06 16:40       ` Antoine Pelisse
2013-01-07  8:33         ` Jeff King
2013-01-06 22:09       ` [PATCH v2] status: always report ignored " Antoine Pelisse
2013-01-07 17:21         ` Torsten Bögershausen
2013-01-07 17:50           ` Junio C Hamano
2013-01-07 19:06         ` Junio C Hamano
2013-01-07 20:24           ` Antoine Pelisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E89AC7.9070600@web.de \
    --to=tboegi@web.de \
    --cc=apelisse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).