Open bungeman opened 6 years ago
Another example: https://gerrit.googlesource.com/gitiles/+refs/changes/ produces a 404 instead of listing refs/changes/*.
Adding support for that kind of URL (and adding the appropriate links to make it discoverable) sounds like a reasonable proposal. I'd be happy to review patches implementing that.
Change under review: https://gerrit-review.googlesource.com/c/gitiles/+/157870
I took a look at RefList.soy and RefServlet.java and there appears to be no good way to explore refs outside of /refs/heads/ and /refs/tags/ . Using /+refs?format=json will dump all of the /refs/* but this isn't exactly discoverable (most don't know about this format). After dumping all the refs to json it is possible to /+/tree-ish to look at the target of the ref, but it would be nice if /+refs/branch-heads/m63 would work directly. This currently won't work because RefServlet.java appears to just up and 404 if anything comes after /+refs .
So this is a request that
Branches master working1
Tags Release 1 Release 2
Other branch-heads/ changes/ pending/ pending-tags/ users/
Where, for example, "branch-heads/" is a link to /+refs/branch-heads/
Basically, this is a request for (what is conceptually) a directory traversal of refs so that they can all be seen, without having to actually send them all since some ref paths may have a large number of auto generated refs. I realize most projects don't have these other refs, but when they do the lack of discoverability makes working with these refs more difficult than needed. In addition, when these refs do exist they are often needed at inconvenient times and making them easily viewable allows one to quickly confirm the current state of the repo.