mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-02 02:40:58 +01:00
Allow GitCommitChangeParser to parse 'T' (type change) messages in
git history.
This commit is contained in:
parent
6e713ad784
commit
bc1be958bd
1 changed files with 6 additions and 0 deletions
|
@ -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}'.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue