]> khamidou — GitHub mirrors - arcanist.git/commit
Improve representation of replaced symlinks in Git
authorepriestley <git@epriestley.com>
Fri, 21 Oct 2011 19:37:40 +0000 (12:37 -0700)
committerepriestley <git@epriestley.com>
Tue, 25 Oct 2011 06:38:56 +0000 (23:38 -0700)
commita85e3444259146ac6f8a28516d000b883ad94976
tree0df37172a9a8081cada5392a1314a2e528aa2833
parentdf8c0e5e25cd4138b2e6c2d900bf1d475b6cb66a
Improve representation of replaced symlinks in Git

Summary:
See T584. Git renders these types of changes somewhat unusually. Ensure they are
rendered as changes.

The fact that a symlink was replaced is not explicitly rendered (e.g., "This
path was changed from a symlink to a regular file."), but can be inferred from
the 'unix:filemode' property change that will accompany the changeset. We could
also make it explicit but this type of change is rare enough that it's probably
good enough as-is.

Test Plan:
  - Ran unit test, which previously failed and now passes.
  - Created a diff which replaces a file with a symlink, verified it rendered a
little more sensibly.

Reviewers: aravindn, dschleimer, jungejason, nh, tuomaspelkonen

Reviewed By: nh

CC: aran, goldshlager, nh
Differential Revision: 1030
src/parser/diff/ArcanistDiffParser.php
src/parser/diff/__tests__/ArcanistDiffParserTestCase.php
src/parser/diff/__tests__/data/git-replace-symlink.gitdiff [new file with mode: 0644]