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

Re: [PATCH 1/1] Bypass expensive content comparsion during rename detection.

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 14, 2006, 11:13 UTC
Message-ID
<20061214111304.GF1747@spearce.org>
In-Reply-To
<20061214110858.GE1747@spearce.org>
Shawn Pearce <spearce@spearce.org> wrote:
> I'll admit, I don't understand the diffcore rename code very well
> so I'm treading around in code that I'm not used to.  I'm not sure
> why the size member of diff_filespec needs to be initialized to get
> rename and copy detection to work properly, but it apparently does.

This chunk of code is probably a perfect example of why side-effects can be so bad. Its fast because the size information is loaded once and reused later on; its horrible to maintain because you don't realize that this simple predicate is actually doing something that matters downstream even though it returned false!

Previous: Shawn PearceNext: Johannes Schindelin
Message 4 of 6 in “Bypass expensive content comparsion during rename detection.”
  1. 1/1 Bypass expensive content comparsion during rename detection.Shawn O. Pearce, Dec 14, 2006
  2. Johannes SchindelinDec 14, 2006
  3. Shawn PearceDec 14, 2006
  4. Shawn PearceDec 14, 2006
  5. Johannes SchindelinDec 14, 2006
  6. Shawn PearceDec 14, 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.