Pull Request Timeline is Wrong When Force Pushing #14973

Closed
opened 2025-11-02 11:27:02 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @smartEBL on GitHub (Sep 22, 2025).

Originally assigned to: @lunny on GitHub.

Description

When having an open PR with commits already added and showing up in the "timeline", I'd expect a force push to be shown correctly in the timeline with some link to the diff of the force push.

To reproduce:

  • added two commits to a branch
  • opened a PR
  • drop the last commit
  • do a force push
  • check the timeline on the PR

This was working in earlier versions of gitea.

Reproduced on Gitea Demo Site [1]

[1] https://demo.gitea.com/smartEBL/test/pulls/1

Gitea Version

1.24.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

What I get:
Image

What I got earlier / what I would expect:
Image

Git Version

2.49.1

Operating System

Ubuntu 22.04

How are you running Gitea?

Gitea runs in a docker container using the official gitea docker image.

Database

SQLite

Originally created by @smartEBL on GitHub (Sep 22, 2025). Originally assigned to: @lunny on GitHub. ### Description When having an open PR with commits already added and showing up in the "timeline", I'd expect a force push to be shown correctly in the timeline with some link to the diff of the force push. To reproduce: - added two commits to a branch - opened a PR - drop the last commit - do a force push - check the timeline on the PR This was working in earlier versions of gitea. Reproduced on Gitea Demo Site [1] [1] https://demo.gitea.com/smartEBL/test/pulls/1 ### Gitea Version 1.24.6 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots What I get: <img width="1005" height="406" alt="Image" src="https://github.com/user-attachments/assets/91e6295c-7348-48d1-b7a1-c4d61a1d9b08" /> What I got earlier / what I would expect: <img width="931" height="48" alt="Image" src="https://github.com/user-attachments/assets/bc31fa7a-2a1a-4974-9879-7a90dd0d5c2f" /> ### Git Version 2.49.1 ### Operating System Ubuntu 22.04 ### How are you running Gitea? Gitea runs in a docker container using the official gitea docker image. ### Database SQLite
GiteaMirror added the topic/prtype/bug labels 2025-11-02 11:27:02 -06:00
Author
Owner

@smartYSC commented on GitHub (Sep 30, 2025):

Any chance to fix this? It is quite annoying as it really blows up the PR history and the super useful compare feature is broken now...

@smartYSC commented on GitHub (Sep 30, 2025): Any chance to fix this? It is quite annoying as it really blows up the PR history and the super useful compare feature is broken now...
Author
Owner

@smartEBL commented on GitHub (Sep 30, 2025):

The problem must have been introduced with 1.24.6 since with 1.24.5 we did not experience it. That should limit the possible root causes to [1]. Maybe it has something to do with [2] - this is more or less guessing, but this change affected the commit comments as well.

[1] https://github.com/go-gitea/gitea/milestone/185?closed=1
[2] https://github.com/go-gitea/gitea/pull/35443

@smartEBL commented on GitHub (Sep 30, 2025): The problem must have been introduced with 1.24.6 since with 1.24.5 we did not experience it. That should limit the possible root causes to [1]. Maybe it has something to do with [2] - this is more or less guessing, but this change affected the commit comments as well. [1] https://github.com/go-gitea/gitea/milestone/185?closed=1 [2] https://github.com/go-gitea/gitea/pull/35443
Author
Owner

@lunny commented on GitHub (Sep 30, 2025):

Which style is the pull request? Github style or AGit style?

@lunny commented on GitHub (Sep 30, 2025): Which style is the pull request? Github style or AGit style?
Author
Owner

@smartEBL commented on GitHub (Oct 1, 2025):

Which style is the pull request? Github style or AGit style?

We're following the Github style (if I understand that question correctly). Our workflow looks like follows:

  • there is only one repo with a protected branch (no forks involved)
  • developers can create own branches in this repo
  • developers can create PRs from their branches into the protected one
  • PRs are usually opened via the Gitea WebUI
  • a PR may contain multiple commits

(I tried to give a minimum example in [1] also).

[1] https://demo.gitea.com/smartEBL/test/pulls/1

@smartEBL commented on GitHub (Oct 1, 2025): > Which style is the pull request? Github style or AGit style? We're following the Github style (if I understand that question correctly). Our workflow looks like follows: - there is only one repo with a protected branch (no forks involved) - developers can create own branches in this repo - developers can create PRs from their branches into the protected one - PRs are usually opened via the Gitea WebUI - a PR may contain multiple commits (I tried to give a minimum example in [1] also). [1] https://demo.gitea.com/smartEBL/test/pulls/1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14973