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

Re: diff machinery cleanup

From
Junio C Hamano <junkio@cox.net>
Date
Aug 10, 2006, 17:06 UTC
Message-ID
<7vzmecv7tp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060810103836.GA1317@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> OK, doing a discard_cache() between the call to run_diff_index and
> run_diff_files seems to clear up the problem. But if I understand
> correctly, are you saying that run_diff_index has munged the index on
> disk, and I really need to be poking at a temporary copy? If so, why
> isn't that a problem when running (e.g.) "git-diff-index; git-ls-files"?

No, run_diff_index munges the index in-core, and it does not writes it out for obvious reasons.

Some of the "interrogation commands" do munge the index without writing it out because that is the easiest/cleanest way to implement what they do. ls-files does it to filter by paths, for example.

> That does sound the cleanest, and it would enable a more useful status
> message, as you mentioned before. What caused you to stop working on it?
> Infeasible, or simply more infeasible than you would like right now?
Finding out somebody was already working on it?
Previous: Jeff KingNext: Jeff King
Message 4 of 6 in “diff machinery cleanup”
  1. Jeff KingAug 10, 2006
  2. Junio C HamanoAug 10, 2006
  3. Jeff KingAug 10, 2006
  4. Junio C HamanoAug 10, 2006
  5. Jeff KingAug 10, 2006
  6. Junio C HamanoAug 10, 2006

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.