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

Re: git status / git diff -C not detecting file copy

From
Bryan Turner <bturner@atlassian.com>
Date
Dec 2, 2014, 21:40 UTC
Message-ID
<CAGyf7-EHBqZn5LCTYuA+07GSNOF0vVdszL6oTUKwY1ETRDKEwA@mail.gmail.com>
In-Reply-To
<20141202065550.GB1948@peff.net>
On Tue, Dec 2, 2014 at 5:55 PM, Jeff King <peff@peff.net> wrote:
Show 17 quoted lines
>
> So from these timings, I'd conclude that:
>
>   1. It's probably fine to turn on copies for "git status".
>
>   2. It's probably even OK to use "-C -C" for some projects. Even though
>      22s looks scary there, that's only 11ms for git.git (remember,
>      spread across 2000 commits). For linux.git, it's much, much worse.
>      I killed my "-C -C" run after 10 minutes, and it had only gone
>      through 1/20th of the commits. Extrapolating, you're looking at
>      500ms or so added to a "git status" run.
>
>      So you'd almost certainly want this to be configurable.
>
> Does either of you want to try your hand at a patch? Just enabling
> copies should be a one-liner. Making it configurable is more involved,
> but should also be pretty straightforward.

I'm interested in taking a stab at a patch, but I'd like to confirm which way to go. Based on Junio's reply I'm not certain the simple patch could get accepted (assuming I do all the submission parts properly and the implementation itself passes review). Does that mean the only real option is the configurable patch?

>
> -Peff
Previous: Junio C HamanoNext: Jeff King
Message 10 of 12 in “git status / git diff -C not detecting file copy”
  1. Pol OnlineNov 30, 2014
  2. Bryan TurnerNov 30, 2014
  3. Pol OnlineNov 30, 2014
  4. Bryan TurnerNov 30, 2014
  5. Jeff KingDec 2, 2014
  6. Pol OnlineDec 2, 2014
  7. Junio C HamanoDec 2, 2014
  8. Jeff KingDec 2, 2014
  9. Junio C HamanoDec 3, 2014
  10. Bryan TurnerDec 2, 2014
  11. Jeff KingDec 2, 2014
  12. Junio C HamanoDec 3, 2014

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.