mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Make directories with spaces in their names work OK in diffusion end to end
Summary: we were parsing the git log output slightly incorrectly and over-exploding on spaces. we also needed to escape the path %20 stuff`. Not sure if there's something fancy to do given folks should reparse their repos if they are impacted by this issue. Test Plan: made a directory with spaces and some dummy revisions. observed diffs wouldn't load and links broken. with patch, ran scripts/reparse.php for pertinent revisions and diffs loaded and links weren't broken. Reviewers: floatinglomas, epriestley Reviewed By: epriestley CC: aran, Koolvin Maniphest Tasks: T1252 Differential Revision: https://secure.phabricator.com/D2510
This commit is contained in:
parent
b624dc4e7b
commit
80f479d948
2 changed files with 2 additions and 2 deletions
|
@ -418,7 +418,7 @@ abstract class DiffusionRequest {
|
|||
// This isn't a real URI per se, it's passed as a query parameter to
|
||||
// the ajax changeset stuff but then we parse it back out as though
|
||||
// it came from a URI.
|
||||
$uri = "{$path}{$commit}";
|
||||
$uri = rawurldecode("{$path}{$commit}");
|
||||
break;
|
||||
case 'commit':
|
||||
$commit = ltrim($commit, ';');
|
||||
|
|
|
@ -73,7 +73,7 @@ final class PhabricatorRepositoryGitCommitChangeParserWorker
|
|||
}
|
||||
list($old_mode, $new_mode,
|
||||
$old_hash, $new_hash,
|
||||
$more_stuff) = preg_split('/ +/', $line);
|
||||
$more_stuff) = preg_split('/ +/', $line, 5);
|
||||
|
||||
// We may only have two pieces here.
|
||||
list($action, $src_path, $dst_path) = array_merge(
|
||||
|
|
Loading…
Reference in a new issue