1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/diffusion
epriestley d44a5fa933 In Git, only use "--find-copies-harder" on small diffs
Summary:
Ref T10423. This flag can cause `git diff` to take an enormously long time (the problem case was a 5M line, 20K file commit).

Instead:

  - Run without the flag first.
  - If that shows that the diff is definitely small, try again with the flag.
  - If that works, return the slower, better output.
  - If the fast diff affects too many paths or generating the slow diff takes too long, return the faster, slightly worse output.

The quality of the output differs in how well Git is able to detect "M" and "C" (moves and copies of files).

For example, if you copy `src/` to `srcpro/`, the fast output may not show that you copied files. The slow output will.

I think this is rarely useful for large copies anyway: it's interesting if a 1-2 file diff is a copy, but usually obvious/uninteresting if a 500-file diff is a copy.

Test Plan:
  - Ran `bin/repository reparse --change rXnnn` on Git changes.
  - Saw fast and slow commands execute normally.
  - Tried on a large diff, saw only the fast command execute.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10423

Differential Revision: https://secure.phabricator.com/D16266
2016-07-10 08:03:57 -07:00
..
application Sort out EditController / ManageController / EditproController Diffusion hierarchy 2016-05-10 05:14:09 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
conduit In Git, only use "--find-copies-harder" on small diffs 2016-07-10 08:03:57 -07:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
controller Add a strong hint about importing or observing repositories to repository creation 2016-07-08 07:43:34 -07:00
data Don't track "phabricator/" staging area tags 2016-06-16 11:22:02 -07:00
doorkeeper Partially modernize Doorkeeper/Asana bridge 2014-10-01 07:09:34 -07:00
edge Fix reverting commit language 2015-06-01 09:54:30 +10:00
editor Fix an issue with creating new Repository URIs via the Web UI 2016-07-09 05:55:45 -07:00
engine When observing a repository, switch to "importing" mode on a large discovery in an empty repository 2016-05-11 06:36:38 -07:00
engineextension Fix an issue with URI index updates from the daemons 2016-05-13 06:51:31 -07:00
exception Make repository daemon locks more granular and forgiving 2016-05-13 05:17:27 -07:00
garbagecollector Support ID-based repository URIs, and canonicalize repository URIs 2016-02-18 09:56:28 -08:00
gitlfs Implement a Git LFS link table and basic batch API 2016-03-17 17:15:20 -07:00
herald Revision substate CLOSED_FROM_ACCEPTED 2016-06-27 20:29:47 +00:00
management Version clustered, observed repositories in a reasonable way (by largest discovered HEAD) 2016-05-30 09:53:01 -07:00
panel Allow administrators to configure global default settings 2016-06-05 13:15:06 -07:00
protocol Use HTTPEngineExtension proxy for git HTTP operations 2016-06-09 12:17:10 -07:00
query Ignore unrecognized refs in "refs/remotes/" 2016-06-16 16:03:36 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup Stop all object mentions from matching after "@" 2015-09-29 06:43:49 -07:00
request Rough sketch of new repository URI editing 2016-04-29 09:21:00 -07:00
response Implement a Git LFS server which supports no operations 2016-03-17 08:08:43 -07:00
ssh Fix improper viewer for Git SSH cluster workflows 2016-05-11 18:02:02 -07:00
symbol Extend from Phobject 2015-06-15 18:02:27 +10:00
typeahead Render browse results with global result style 2016-06-20 16:49:02 -07:00
view Build that thing someone posted a screenshot of on Facebook 2016-07-01 04:36:24 -07:00
DiffusionLintSaveRunner.php Move repository URIs to a dedicated index 2016-01-13 09:34:31 -08:00