Skip to content

sugget show commits from old to new in list #11377

@a1012112796

Description

@a1012112796
Member
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @techknowlogick@a1012112796

        Issue actions

          sugget show commits from old to new in list · Issue #11377 · go-gitea/gitea