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

Re: [PATCH] git-add--interactive: never skip files included in index

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2009, 02:46 UTC
Message-ID
<7v63alpbwx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091012014007.GA7674@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> So now I am doubly confused. Did this feature exist, and was broken, and
> you actually fixed it in 63d285c, creating what looked like a regression
> but was actually intentional?

I do not think it was an intentional change. I _think_ the comment at the beginning of show_files() tells us quite a bit---we don't do read-dir when showing the indexed files, and I suspect that we used to rely on the fact that not doing the read-dir made exclusion mechanism a no-op. After the lazy .gitignore reading, I suspect that excluded() call started to initialize the exclude mechanism lazily, and that is how the bug was introduced, isn't it?

Regarding your patch, the loops deal with paths that are already in the index, so removing the conditional skip looks like a sane thing to do.

Previous: Jeff KingNext: Jeff King
Message 6 of 8 in “git-add--interactive: never skip files included in index”
  1. git-add--interactive: never skip files included in indexPauli Virtanen, Oct 10, 2009
  2. Junio C HamanoOct 11, 2009
  3. Jeff KingOct 11, 2009
  4. Junio C HamanoOct 11, 2009
  5. Jeff KingOct 12, 2009
  6. Junio C HamanoOct 12, 2009
  7. Jeff KingOct 12, 2009
  8. Junio C HamanoOct 12, 2009

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.