Skip to content

Commit

Permalink
commits panel: add missing default sort order (jesseduffield#4097)
Browse files Browse the repository at this point in the history
- **PR Description**

In the commits panel, <c-l> menu has only 3 sort orders, but previously
`git.log.order` had 4 accepted values. `default` is missing in the new
menu.

with `default` selected, I can see `gitlogorder: default` in state.yml
and it function as expected in `lazygit --logs`

```bash
git log HEAD --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%m%x00%s --abbrev=40 -300 --no-show-signature -- (145.062786ms)
```

- **Please check if the PR fulfills these requirements**

* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [ ] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [ ] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [ ] Docs have been updated if necessary
* [x] You've read through your own file changes for silly mistakes etc
  • Loading branch information
stefanhaller authored Dec 3, 2024
2 parents 954347c + 6da42b0 commit 3a4422f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gui/controllers/local_commits_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,11 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
OnPress: onPress("author-date-order"),
Widget: types.MakeMenuRadioButton(currentValue == "author-date-order"),
},
{
Label: "default",
OnPress: onPress("default"),
Widget: types.MakeMenuRadioButton(currentValue == "default"),
},
},
})
},
Expand Down

0 comments on commit 3a4422f

Please sign in to comment.