Page MenuHomePhorge

'arc browse .' from the root of the project should work (at least in git and SVN)
Open, WishlistPublic

Description

This seems a minor bug report about a corner case in arc browse with a dot . as unique argument from the root directory of the repository.

Kindly reported by Keith from https://we.phorge.it/D25823#22340 - thanks for that nice catch!

Steps to reproduce

On whatever local git repo, like from the Phorge repository, run arc browse .. Example:

cd /home/userlol/LOLCommunityRepos/phorge
arc browse .

What happens

You are redirected to something nonsense like here:

https://we.phorge.it/source/phorge/browse/master/home/userlol/LOLCommunityRepos/phorge

What should happen instead

Something non borked that does not try to expose your local filesystem to the remote Phorge server.

❌ Proposal 1 (maybe nonsense)

It should maybe visit the HEAD commit:

https://we.phorge.it/rARCb3d45c71041478c1410bfae2aaf88a95106cfc5b

✅ Proposal 2

Or, it should visit the homepage:

https://we.phorge.it/source/phorge/browse/master/

From my perspective this makes a lot of sense.

This was very probably the original intention, accordingly to this comment:

https://we.phorge.it/source/arcanist/browse/master/src/browse/query/ArcanistBrowseCommitHardpointQuery.php;29ca3df1122b0ef3bec335db14dfdc903a1e7582$23-27

Event Timeline

valerio.bozzolan triaged this task as Wishlist priority.
valerio.bozzolan created this object in space S1 Public.

Testing this a bit myself again, I discovered that actually this problem affects both Git and SVN, it just wasn't being noticed in my SVN testing because it doesn't go wrong if run from any subfolder. So for example in a checkout of rARC, running arc browse . in the root directory will pop one into the bogus path of, say, https://we.phorge.it/source/arcanist/browse/master/home/keithzg/Code/git/arcanist, but if I'm in my local ~/Code/git/arcanist/src/ then arc browse . pops open https://we.phorge.it/source/arcanist/browse/master/src as intended.

valerio.bozzolan renamed this task from 'arc browse .' should work in git to 'arc browse .' from the root of the project should work (at least in git and SVN).Wed, May 14, 07:14
valerio.bozzolan updated the task description. (Show Details)

Testing this a bit myself again, I discovered that actually this problem affects both Git and SVN

Yes that's true thanks @keithzg - I've probably set a title with a more limited scope. Feel free to improve title and description. After D25823 I would like to submit a follow-up patch to close this legacy bug.