You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
Follow a single level directory tree down to its first subtree that has more than one
child.
In this page:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit
clicking on "src/" should take me to:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit/src/main/java/org/eclipse/jgit/
and not the fairly useless:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit/src/
This is tricky because we don't want to inflate each subtree when looking at the parent
just to find out if its got >1 child or not. If we have the src/ URL just redirect
when it finds itself in this case, you can't view src/ by itself anymore in the breadcrumb
trail. Maybe we could force it to *not* auto-dive by putting a special URL in the breadcrumb
trail when we know the parent has only one child, and skip the redirect for src/ if
the URL was actually src/. (the illegal trailing single dot meaning show self and disable
auto-dive).
This feature is primarily useful for Java projects like Gerrit where the package structure
is really deep and single foldery all the way down. Its less useful on things like
the kernel that have a sane directory tree layout.
Reported by None on 2012-11-11 15:33:04
The text was updated successfully, but these errors were encountered:
Follow a single level directory tree down to its first subtree that has more than one
child.
In this page:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit
clicking on "src/" should take me to:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit/src/main/java/org/eclipse/jgit/
and not the fairly useless:
https://gerrit.googlesource.com/gerrit/+/master/gerrit-patch-jgit/src/
This is tricky because we don't want to inflate each subtree when looking at the parent
just to find out if its got >1 child or not. If we have the src/ URL just redirect
when it finds itself in this case, you can't view src/ by itself anymore in the breadcrumb
trail. Maybe we could force it to *not* auto-dive by putting a special URL in the breadcrumb
trail when we know the parent has only one child, and skip the redirect for src/ if
the URL was actually src/. (the illegal trailing single dot meaning show self and disable
auto-dive).
This feature is primarily useful for Java projects like Gerrit where the package structure
is really deep and single foldery all the way down. Its less useful on things like
the kernel that have a sane directory tree layout.
My plan is to have /src/. not auto-dive, and to hack the breadcrumbs to add that only
for those paths where necessary. It's a bit ugly because the breadcrumb URL generating
code is a pure function of the current URL, so the "auto-dive root" has to be passed
in, which complicates the initial TreeWalk setup. But not impossible.
Fixed in https://gerrit.googlesource.com/gitiles/+/4e8ffd8f4e94585c9f5cae12e14d1c4c92a68659
Query parameters still suck. The rationalization for keeping this is nobody really
needs to be able to predict/type these URLs manually. If someone really means to link
to /foo/src/main/java/com, they can type it in, see that it auto-dives, and copy the
URL out of the breadcrumbs.
Originally reported on Google Code with ID 8
Reported by
None
on 2012-11-11 15:33:04The text was updated successfully, but these errors were encountered: