-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add remoteBranchOrder config #3158
Conversation
66528e0
to
3d58543
Compare
3d58543
to
cef1547
Compare
Takes alphabetical or lastCommit order, defaults to alphabetical
cef1547
to
88f04be
Compare
Also worth noting that |
This is a very welcome addition, I wanted this myself too. Thanks for the contribution. However, I think it shouldn't be a config. I'd like us to move away from adding config options for things that we could also save in state.yml (see #3166 for more examples). So what I would like to have is a menu that lets users change the sort order at runtime, and then persist this in state.yml. It seems that BTW, we also would like to have the sort order configurable for local branches (see here for some discussion about that; click "Load more" to see all of it). It's a little more involved there, as we're currently sorting by recency based on the local reflog, so we'd want three entries (recency, commit date, alphabetic). I'm not asking you to do that in this PR too, it could be a separate one later. And finally, I think we should sort by committer date instead of author date. The rationale here is that any kind of activity on a branch should move it to the top, including rebasing it, amending commits, or rewording commit messages. |
Hi @stefanhaller thanks for your comment! A runtime option persistent in state.yml is a better approach to this, agree on that. I am not familiar with how the menus are managed in lazygit TUI but I can have a go at it.
|
Sounds good! Let me know if you need any help. |
Closing in favour of #3171 |
PR Description
As requested in Order remote branches by date of last commit #1412 and PR'd but abandoned in Add config to sort origin branches by last commit #2011. This PR takes the suggestions from @jesseduffield and makes the config prop an enum with
alphabetical
sort order being the default and an alternativelastCommit
.Please check if the PR fulfills these requirements
go generate ./...
)docs/Config.md
) have been updated if necessary