@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue with browsing repositories that have README, etc

Summary: D3533 changed the path for files at root from, e.g., "README" to "/README", which fatals when we try to `git cat-file` it.

Test Plan:
This no longer happens:

{F24874}

Viewed a directory in browse without a trailing slash in the URL.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4016

+7 -1
+7 -1
src/applications/diffusion/query/browse/DiffusionGitBrowseQuery.php
··· 60 60 61 61 $submodules = array(); 62 62 63 + if (strlen($path)) { 64 + $prefix = rtrim($path, '/').'/'; 65 + } else { 66 + $prefix = ''; 67 + } 68 + 63 69 $results = array(); 64 70 foreach (explode("\0", rtrim($stdout)) as $line) { 65 71 ··· 83 89 } 84 90 } 85 91 86 - $result->setFullPath(rtrim($path, '/').'/'.$name); 92 + $result->setFullPath($prefix.$name); 87 93 $result->setPath($name); 88 94 $result->setHash($hash); 89 95 $result->setFileType($file_type);