#3726 pygit2.GIT_SORT_NONE should be used instead of pygit2.GIT_SORT_TIME
Closed: Fixed 5 years ago Opened 5 years ago by bkabrda.

I've run into a situation where Pagure shows a different order of commits for a branch than one of my users has in his local clone of that repo. When a PR is created from that repo and retrieved with pull-request/X.patch, it fails to apply, because the order of commits is also wrong there.

After some debugging, it seems that Pagure is using pygit2.GIT_SORT_TIME, which is non-standard. AFAICS the default git sorting behavior is using pygit2.GIT_SORT_NONE. I think we should just switch to pygit2.GIT_SORT_NONE at all places (or perhaps make this a config value?) to make sure Pagure shows commits in same order as git log, which is what users expect.


wfm, shall I or do you want to?

Metadata Update from @pingou:
- Issue tagged with: bug

5 years ago

@pingou I can do that. Do you prefer just replacing this or doing a config variable for it? (I'd prefer just replacing, IMHO shouldn't even be an option).

Metadata Update from @pingou:
- Issue set to the milestone: 5.1

5 years ago

Replacing is fine with me

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Metadata Update from @ryanlerch:
- Issue assigned to bkabrda

5 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3727 Merged 5 years ago