1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications/differential
epriestley 039a5a6d86 Simplify hunk parsing
Summary:
Simplify whitespace-ignoring diffing:

  - Currently, we generate two diffs (one ignoring whitespace, one normal) and then copy the //text content// from the normal one to the whitespace-ignoring one.
  - Instead, copy the //change types// from the ignoring one to the normal one.
    - This is cheaper and much simpler.
    - It means that we have the right change types in reparseHunksForSpecialAttributes(), and can simplify some other things.

Simplify whitespace changes, unchanged files, and deleted file detections:

  - Currently, we do this inline with a bunch of other stuff, in the reparse step.
  - Instead, do it separately. This is simpler.

Simplify intraline whitespace handling:

  - Currently, this is a complicated mess that makes roughly zero sense.
  - Instead, do it in reparse in a straightforward way.

Partially fix handling of files changed only by changing whitespace.
Partially fix handling of unchanged files.

Test Plan:
  - Ran unit tests.
  - Created context-less diffs, verified they rendered reasonably.
  - Generated a diff with prefix whitespace, suffix whitespace, intraline whitespace, and non-whitespace changes. Verified changes rendered correctly in "ignore most" and "show all" modes.
  - Verified unchanged files and files with only whitspace changes render with the correct masks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2009

Differential Revision: https://secure.phabricator.com/D4398
2013-01-11 15:25:15 -08:00
..
application Allow displaying more users at once in Differential overview 2013-01-11 12:32:33 -08:00
conduit Move Conduit methods inside applications 2012-12-21 12:21:59 -08:00
config Fix more boolean reversals. 2013-01-09 08:33:56 -08:00
constants change DifferentialRevisionDetailView to use newer fangled UI abstractions 2012-12-11 14:59:27 -08:00
controller Allow filtering Differential overviews by other participants 2013-01-11 13:45:25 -08:00
data Delete license headers from files 2012-11-05 11:16:51 -08:00
editor Improve Search architecture 2012-12-21 14:21:31 -08:00
exception Delete license headers from files 2012-11-05 11:16:51 -08:00
field Display other locations of lint errors 2013-01-11 14:04:29 -08:00
mail re-factor DifferentialChangesetParser pass 3 / N 2013-01-09 13:11:17 -08:00
parser Simplify hunk parsing 2013-01-11 15:25:15 -08:00
query Allow displaying more users at once in Differential overview 2013-01-11 12:32:33 -08:00
render Simplify context parsing and add test coverage 2013-01-10 16:06:39 -08:00
search Improve Search architecture 2012-12-21 14:21:31 -08:00
stats Delete license headers from files 2012-11-05 11:16:51 -08:00
storage re-factor DifferentialChangesetParser pass 3 / N 2013-01-09 13:11:17 -08:00
view Move setUser() to AphrontView 2012-12-20 14:49:52 -08:00
DifferentialReplyHandler.php be careful of received mail object in error cases too 2012-11-20 17:19:26 -08:00
DifferentialTasksAttacher.php Delete license headers from files 2012-11-05 11:16:51 -08:00