1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 09:20:58 +01:00

Allow GitCommitChangeParser to parse 'T' (type change) messages in

git history.
This commit is contained in:
epriestley 2011-04-14 14:16:53 -07:00
parent 6e713ad784
commit bc1be958bd

View file

@ -101,6 +101,10 @@ class PhabricatorRepositoryGitCommitChangeParserWorker
$change_target = $src_path;
$move_away[$change_target][] = $change_path;
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':
if ($file_type == DifferentialChangeType::FILE_DIRECTORY) {
$change_type = DifferentialChangeType::TYPE_CHILD;
@ -109,6 +113,8 @@ class PhabricatorRepositoryGitCommitChangeParserWorker
$change_type = DifferentialChangeType::TYPE_CHANGE;
}
break;
// NOTE: "U" (unmerged) and "X" (unknown) statuses are also possible
// in theory but shouldn't appear here.
default:
throw new Exception("Failed to parse line '{$line}'.");
}