Redo branch redirect

This version of BranchRedirect isn't a BranchRedirectFilter. Instead
this carries just redirects and is applied when a ViewFilter is created,
i.e. the very first step in the process.

The older implementation returned a redirect with a new URL. While this
does the redirect in-place. User does not know if the gitiles command
they requested is transformed to use a new branch. This transformation
is only valid on requests that are not from automation (i.e. HTTP only).

This will also help when the source branch is deleted. Older
implementation didn't work since ViewFilter wasn't created on deleted
or non-existent branch.

PiperOrigin-RevId: 411156730
Change-Id: I4193a86d36e3d46cb19abf9c7b52a94b1feef5c1
11 files changed
tree: 1fbca76ce613f6fe63225a3d4df4e227016698d3
  1. .bazelrc
  2. .bazelversion
  3. .gitignore
  4. .mailmap
  5. .settings/
  6. BUILD
  7. COPYING
  8. Documentation/
  9. README.md
  10. WORKSPACE
  11. fake_pom_deploy.xml
  12. java/com/google/gitiles/
  13. javatests/com/google/gitiles/
  14. lib/
  15. navbar.md
  16. resources/
  17. tools/
  18. version.bzl
README.md

Gitiles - A simple JGit repository browser

Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.

Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.

Configuration

Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.

Bugs

Use the issue tracker at github to file bugs.

Contributing to Gitiles

Please refer to the Developer Guide.