Allow GitCommitChangeParser to parse 'T' (type change) messages in
git history.
This commit is contained in:
@@ -101,6 +101,10 @@ class PhabricatorRepositoryGitCommitChangeParserWorker
|
|||||||
$change_target = $src_path;
|
$change_target = $src_path;
|
||||||
$move_away[$change_target][] = $change_path;
|
$move_away[$change_target][] = $change_path;
|
||||||
break;
|
break;
|
||||||
|
case 'T':
|
||||||
|
// Type of the file changed, fall through and treat it as a
|
||||||
|
// modification. Not 100% sure this is the right thing to do but it
|
||||||
|
// seems reasonable.
|
||||||
case 'M':
|
case 'M':
|
||||||
if ($file_type == DifferentialChangeType::FILE_DIRECTORY) {
|
if ($file_type == DifferentialChangeType::FILE_DIRECTORY) {
|
||||||
$change_type = DifferentialChangeType::TYPE_CHILD;
|
$change_type = DifferentialChangeType::TYPE_CHILD;
|
||||||
@@ -109,6 +113,8 @@ class PhabricatorRepositoryGitCommitChangeParserWorker
|
|||||||
$change_type = DifferentialChangeType::TYPE_CHANGE;
|
$change_type = DifferentialChangeType::TYPE_CHANGE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// NOTE: "U" (unmerged) and "X" (unknown) statuses are also possible
|
||||||
|
// in theory but shouldn't appear here.
|
||||||
default:
|
default:
|
||||||
throw new Exception("Failed to parse line '{$line}'.");
|
throw new Exception("Failed to parse line '{$line}'.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user