Fix missing reference name in JSON output

After I088ef448, the name of the ref was transmitted as an empty string
via JSON when the exact path of a reference was specified. Fix this
regression by not removing the path prefix for exactly matched refs and
add a test for it.

This fix only tries to establish the behavior prior to I088ef448. Even
previously, it was a bit peculiar: Branch names are truncated in the
JSON output when multiple refs are found for a given ref name. This
doesn't happen when text output is chosen or only a single ref is found.

Change-Id: I82ac61e4eb6812404566a393dd6e60c829d5cd97
2 files changed
tree: 65faa1c8005af45990b632d1e0da30e5eaa5d45f
  1. .settings/
  2. Documentation/
  3. java/
  4. javatests/
  5. lib/
  6. resources/
  7. tools/
  8. .bazelrc
  9. .gitignore
  10. .mailmap
  11. BUILD
  13. fake_pom_deploy.xml
  16. version.bzl

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.


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


Use the issue tracker at github to file bugs.

Contributing to Gitiles

Please refer to the Developer Guide.