Skip to content

404 on commit page if amended a commit and force pushed  #13737

Closed
@mlthlschr

Description

@mlthlschr
  • Gitea version (or commit ref): 1.12.6
  • Git version: 2.24.3
  • Operating system: Debian 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I just recognized that I had a wrong letter (*) in my commit message (which made my CI fail as it could not parse the message). I amended the commit (git commit --amend) changing the message so it does not include the letter anymore. Then I force pushed it to gitea. Now, if I want to open the commit page of this very commit, it just opens in the 404 page.

The commit I amended was a commit generated by my account in gitea after squashing and merging a PR.

Some hint from the log:

 2020/11/28 16:00:10 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT max( id ) as id FROM `commit_status` WHERE (repo_id = ?) AND (sha = ?) GROUP BY context_hash ORDER BY max( id ) desc LIMIT 10 [27 b32d978e0197e35d16ca29fc288afd44d69d4bdc] - 902.783µs                                               
2020/11/28 16:00:10 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `index`, `repo_id`, `state`, `sha`, `target_url`, `description`, `context_hash`, `context`, `creator_id`, `created_unix`, `updated_unix` FROM `commit_status` WHERE `id` IN (?) [1084] - 479.88µs                               
2020/11/28 16:00:11 ...uters/repo/commit.go:257:Diff() [E] GetDiffCommit: ParsePatch: Unexpected line in hunk: AAK/H,EAAI,EAAGG,EAAM4H,EAAU1H,OAAQL,EAAIG   
 [...]
 ,IAAM6D,KAAK7D,GACjBwJ,EAAM1B,IAAMjE,KAAKiE,GAKzB2C,SAAU,SAAUj 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions