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

[PATCH] status: report ignored yet tracked directories

From
Antoine Pelisse <apelisse@gmail.com>
Date
Jan 5, 2013, 20:42 UTC
Message-ID
<1357418563-6626-1-git-send-email-apelisse@gmail.com>
In-Reply-To
<20130105112432.GA14666@sigill.intra.peff.net>

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
Previous: Antoine PelisseNext: Torsten Bögershausen
Message 4 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.