Page MenuHomePhabricator

fold empty directories in Browse view
Open, Needs TriagePublic

Description

In Java, it's very common to have all your code at the bottom of a long string of directories:
foo/src/main/com/company/department/branch/category/project/Main.java, where anything from com to project in this example holds nothing but the next directory.
This makes navigating to the code in Diffusion require visiting 5 extra pages with no information in them.

The page for foo/src/main should link directly to ....../project/ (First directory which contains anything interesting).

Event Timeline

eadler added a project: Restricted Project.Apr 10 2016, 12:40 AM

Looks like this will require either an uncomfortable number of calls to git ls-tree, or a call to git ls-files followed by a possibly very large filtering and groking of its output.

We could maybe git ls-tree -r -d -- <tree> and then parse that. Still a lot of stuff, but somewhat less than the other approaches -- it only takes about 20ms to generate for phabricator/. If that output more than 5K paths or whatever we could give up and fall back to an unfolded list.

Possibly we could use a heuristic like "is the directory named com/" since ~100% of this is Java goofiness, I think.

eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Apr 17 2016, 6:26 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:18 PM

Hello @epriestley, could you please provide any update on this task?
Won'tFix or InQueue ?