sugget show commits from old to new in list #5382

Closed
opened 2025-11-02 06:23:06 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @a1012112796 on GitHub (May 11, 2020).

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

Description

Hello,Currently, the new commit comes before the old one in the pr commits list.I don't like this style, suggest displaying it in the old to new order, which is the same as github. Thanks
compare view:
gitea:

image

github:

image

maybe we can use this way to change, but I'm not confirm this way is right.

diff --git a/modules/git/repo.go b/modules/git/repo.go
index 644ff0928..491a97889 100644
--- a/modules/git/repo.go
+++ b/modules/git/repo.go
@@ -65,7 +65,7 @@ func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, err
                if err != nil {
                        return nil, err
                }
-               l.PushBack(commit)
+               l.PushFront(commit)
        }

        return l, nil
Originally created by @a1012112796 on GitHub (May 11, 2020). - Gitea version (or commit ref): - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description Hello,Currently, the new commit comes before the old one in the pr commits list.I don't like this style, suggest displaying it in the old to new order, which is the same as github. Thanks compare view: gitea: ![image](https://user-images.githubusercontent.com/25342410/81577503-17d2ca80-93dc-11ea-9265-44fd150b52e6.png) github: ![image](https://user-images.githubusercontent.com/25342410/81577629-3d5fd400-93dc-11ea-88c1-108f198e8f35.png) maybe we can use this way to change, but I'm not confirm this way is right. ```DIFF diff --git a/modules/git/repo.go b/modules/git/repo.go index 644ff0928..491a97889 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -65,7 +65,7 @@ func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, err if err != nil { return nil, err } - l.PushBack(commit) + l.PushFront(commit) } return l, nil ```
GiteaMirror added the topic/uitype/proposal labels 2025-11-02 06:23:06 -06:00
Author
Owner

@a1012112796 commented on GitHub (Sep 7, 2020):

stale?

@a1012112796 commented on GitHub (Sep 7, 2020): stale?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5382