Skip to content

404 when comparing tags #6141

@RobertKosten

Description

@RobertKosten

name: 404 when comparing tags
about: The /compare/endpoint balks when comparing tags instead of branch names (offered through the UI)


Describe the bug
When viewing a tag the compare button offers to compare the tag to master, e.g. https://try.gogs.io/RobertKosten/example-project/compare/master...tag, which leads to a 404. It works fine when comparing branches, but tags seem to always fail (tried comparing two tags, tags with only [a-z]+).

Gogs version and commit
Gogs Version: 0.11.91.0811
Go1.12.7

Git version
1.9.1

Operating system
ubuntu 14.04.1

Database
mysql 5.5.62-0ubuntu0.14.04.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to Repository page
  2. Click on 'Branch:master'
  3. Click on 'Tags'
  4. Click on any {tagname}
  5. Click on green compare button to the left on 'Tree: {tagname}'
  6. See 404

Can you reproduce the bug at https://try.gogs.io?
No, because I cannot clone and there seems to be no way to create a tag through the UI.

Expected behavior
A comparison between tag and branch/tag/etc. is displayed, just like between branches.

Actual behavior
404

Screenshots
Let's no go overboard, no? ;-)

Additional context
[TRACE] Template: status/404

Metadata

Metadata

Assignees

No one assigned

    Labels

    💊 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions