Support branch redirecting from a deleted or non-existent branch to HEAD.

BranchRedirectFilter uses the ViewFilter to obtain the GitilesView. The GitilesView is not created for a deleted branch. This causes `BranchRedirectFilter to not redirect as expected. Since branch redirect is used primarily to migrate from master to main, and master to be eventually deleted. HEAD would be set to main since master is being deleted. This makes HEAD a correct place to redirect to.

PiperOrigin-RevId: 411156730
Change-Id: I4193a86d36e3d46cb19abf9c7b52a94b1feef5c1
3 files changed
tree: bf3ac494265526ed8ba7d5587372d1843054088f
  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/
  13. javatests/
  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.