git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] status: always report ignored tracked directories

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 7, 2013, 17:21 UTC
Message-ID
<50EB0409.1090307@web.de>
In-Reply-To
<1357510179-22852-1-git-send-email-apelisse@gmail.com>

On 06.01.13 23:09, Antoine Pelisse wrote: [snip]

Show 35 quoted lines
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
>  dir.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/dir.c b/dir.c
> index 9b80348..f836590 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);
> @@ -877,11 +878,7 @@ static int treat_file(struct dir_struct *dir, struct strbuf *path, int exclude,
>  	if (exclude)
>  		exclude_file = !(dir->flags & DIR_SHOW_IGNORED);
>  	else if (dir->flags & DIR_SHOW_IGNORED) {
> -		/*
> -		 * Optimization:
> -		 * Don't spend time on indexed files, they won't be
> -		 * added to the list anyway
> -		 */
> +		/* Always exclude indexed files */
>  		struct cache_entry *ce = index_name_exists(&the_index,
>  		    path->buf, path->len, ignore_case);
>
> --
> 1.7.12.4.3.g90f5e2d
>

The bad news: the patch does not apply. The good news: t7061 passes on pu, and dir.c seems to be changes as needed:

commit 1f4e17c6c9833f17dc6bbf045f8a8d6378dcb417
Merge: dee1fa4 cc37e5b
Author: Junio C Hamano <gitster@pobox.com>
Date: Sun Jan 6 23:46:29 2013 -0800
Merge branch 'nd/parse-pathspec' into pu
which comes from Duy:
commit cc37e5bf18ca11d9a884bddfebcdff61df3e6279
Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date: Sun Jan 6 13:21:08 2013 +0700
Convert more init_pathspec() to parse_pathspec()
Previous: Antoine PelisseNext: Junio C Hamano
Message 10 of 13 in “t7061: comments and one failure”
  1. Torsten BögershausenJan 5, 2013
  2. Jeff KingJan 5, 2013
  3. Antoine PelisseJan 5, 2013
  4. status: report ignored yet tracked directoriesAntoine Pelisse, Jan 5, 2013
  5. Torsten BögershausenJan 5, 2013
  6. Jeff KingJan 5, 2013
  7. Antoine PelisseJan 6, 2013
  8. Jeff KingJan 7, 2013
  9. status: always report ignored tracked directoriesAntoine Pelisse, Jan 6, 2013
  10. Torsten BögershausenJan 7, 2013
  11. Junio C HamanoJan 7, 2013
  12. Junio C HamanoJan 7, 2013
  13. Antoine PelisseJan 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.