Fixed 'Create Diff'
Summary: 'Create Diff' with whitespace mode 'ignore-all' is borken, because the line numbers get mixed up when creating a second diff for the whitespace changes. This should be fixed correctly at some point, but currently the whitespace 'ignore-all' says 'Huge mess' in the comments and I didn't want to make the mess any bigger. Test Plan: Tested that 'Create Diff' showed the diff correctly and a previously created diff looked correct once the cache was disabled. Reviewed By: epriestley Reviewers: epriestley, jungejason CC: aran, epriestley Differential Revision: 473
This commit is contained in:
parent
988b038e2e
commit
6b7db27524
|
@ -742,10 +742,16 @@ class DifferentialChangesetParser {
|
||||||
|
|
||||||
$changeset = $this->changeset;
|
$changeset = $this->changeset;
|
||||||
|
|
||||||
|
// Get the diff for figuring out the creation method. Currently
|
||||||
|
// 'web' method is broken for 'ignore-all' mode, because the original
|
||||||
|
// file is not available, only the diff part.
|
||||||
|
$diff = id(new DifferentialDiff())->load($changeset->getDiffID());
|
||||||
|
|
||||||
if ($changeset->getFileType() == DifferentialChangeType::FILE_TEXT ||
|
if ($changeset->getFileType() == DifferentialChangeType::FILE_TEXT ||
|
||||||
$changeset->getFileType() == DifferentialChangeType::FILE_SYMLINK) {
|
$changeset->getFileType() == DifferentialChangeType::FILE_SYMLINK) {
|
||||||
if ($skip_cache || !$this->loadCache()) {
|
if ($skip_cache || !$this->loadCache()) {
|
||||||
if ($this->whitespaceMode == self::WHITESPACE_IGNORE_ALL) {
|
if ($this->whitespaceMode == self::WHITESPACE_IGNORE_ALL &&
|
||||||
|
$diff->getCreationMethod() != 'web') {
|
||||||
|
|
||||||
// Huge mess. Generate a "-bw" (ignore all whitespace changes) diff,
|
// Huge mess. Generate a "-bw" (ignore all whitespace changes) diff,
|
||||||
// parse it out, and then play a shell game with the parsed format
|
// parse it out, and then play a shell game with the parsed format
|
||||||
|
|
Loading…
Reference in a new issue