@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.

Locate File: allow to search './path/to/something.txt'

Summary:
Before this change, if you search a file using Locate File,
this was the only accepted syntax for a full-path:

path/to/something.txt

After this change, some relative/absolute Unix-like variants
are also accepted:

./path/to/something.txt
/path/to/something.txt

Similar prefixes can be frequent when you quickly copy-paste things
from shell commands like 'grep' or 'find' etc.

Ref T15508

Test Plan:
Visit a lovely repository like Phorge and use Locate File with these:

1. src/applications/maniphest/editor/ManiphestEditEngine.php
2. /src/applications/maniphest/editor/ManiphestEditEngine.php
3. ./src/applications/maniphest/editor/ManiphestEditEngine.php

After this change, also 2. and 3. return the expected file.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15508

Differential Revision: https://we.phorge.it/D25320

+12 -8
+8 -8
resources/celerity/map.php
··· 387 387 'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b', 388 388 'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd', 389 389 'rsrc/js/application/differential/behavior-populate.js' => 'b86ef6c2', 390 - 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => '94243d89', 390 + 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => '6c798a10', 391 391 'rsrc/js/application/diffusion/ExternalEditorLinkEngine.js' => '48a8641f', 392 392 'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'b7b73831', 393 393 'rsrc/js/application/diffusion/behavior-commit-branches.js' => '4b671572', ··· 707 707 'javelin-chart-function-label' => '81de1dab', 708 708 'javelin-color' => '78f811c9', 709 709 'javelin-cookie' => '05d290ef', 710 - 'javelin-diffusion-locate-file-source' => '94243d89', 710 + 'javelin-diffusion-locate-file-source' => '6c798a10', 711 711 'javelin-dom' => 'e4c7622a', 712 712 'javelin-dynval' => '202a2e85', 713 713 'javelin-event' => 'c03f2fb4', ··· 1555 1555 'phabricator-textareautils', 1556 1556 'phabricator-remarkup-metadata', 1557 1557 ), 1558 + '6c798a10' => array( 1559 + 'javelin-install', 1560 + 'javelin-dom', 1561 + 'javelin-typeahead-preloaded-source', 1562 + 'javelin-util', 1563 + ), 1558 1564 '6cfa0008' => array( 1559 1565 'javelin-dom', 1560 1566 'javelin-dynval', ··· 1761 1767 'javelin-util', 1762 1768 'phabricator-prefab', 1763 1769 'javelin-json', 1764 - ), 1765 - '94243d89' => array( 1766 - 'javelin-install', 1767 - 'javelin-dom', 1768 - 'javelin-typeahead-preloaded-source', 1769 - 'javelin-util', 1770 1770 ), 1771 1771 '9623adc1' => array( 1772 1772 'javelin-behavior',
+4
webroot/rsrc/js/application/diffusion/DiffusionLocateFileSource.js
··· 99 99 return []; 100 100 } 101 101 102 + // Be nice with terminal users that may have "./" or "/" prefixes. 103 + // Otherwise, not a single result is returned. 104 + search = search.replace(/^\.?\//, ''); 105 + 102 106 // We know that the results for "abc" are always a subset of the results 103 107 // for "a" and "ab" -- and there's a good chance we already computed 104 108 // those result sets. Find the longest cached result which is a prefix