mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Remove leading "/" so that "git cat-file" works
Summary: When the absolute path is used for load file (loadFileContent(()), it fails in git. For example: /var/repo/page_admin_app > git cat-file blob '4d6c03923006d6c444660f2c734fe03e10fd20bd':'/ios/PageAdminApp/Resources/splash/De fault-Portrait@2x~ipad.png' fatal: Not a valid object name 4d6c03923006d6c444660f2c734fe03e10fd20bd:/ios/PageAdminApp/Resources/s plash/Default-Portrait@2x~ipad.png This is breaking the auto-closing for about 8 revisions like https://phabricator.fb.com/rPPA4d6c03923006d6c444660f2c734fe03e10fd20bd ... https://phabricatorcator.fb.com/rPPA51acb7e482aab0c491b530ed19dddc741d50f673 ... Test Plan: - reparsed https://phabricator.fb.com/rPPA4d6c03923006d6c444660f2c734fe03e10fd20bd successfully with corresponding differential revision being closed. - verified that without leading '/', loadFileContent for svn still works. Both of the following commands worked (note the double '/' right before 'tfb': svn cat svn+ssh://svn.vip.facebook.com/svnroot//tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700 svn cat svn+ssh://svn.vip.facebook.com/svnroot/tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700 Reviewers: vrana Reviewed By: vrana CC: nh, aran, epriestley Differential Revision: https://secure.phabricator.com/D2847
This commit is contained in:
parent
2b946459b5
commit
b644a2c3a7
1 changed files with 2 additions and 0 deletions
|
@ -221,12 +221,14 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
|
|||
'commit');
|
||||
foreach ($vs_diff->loadChangesets() as $changeset) {
|
||||
$path = $changeset->getAbsoluteRepositoryPath($repository, $vs_diff);
|
||||
$path = ltrim($path, '/');
|
||||
$vs_changesets[$path] = $changeset;
|
||||
}
|
||||
|
||||
$changesets = array();
|
||||
foreach ($diff->getChangesets() as $changeset) {
|
||||
$path = $changeset->getAbsoluteRepositoryPath($repository, $diff);
|
||||
$path = ltrim($path, '/');
|
||||
$changesets[$path] = $changeset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue