1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-24 06:42:03 +03:00

Move LocalBranchSortOrder and RemoteBranchSortOrder to user config

At the same time, we change the defaults for both of them to "date" (they were
"recency" and "alphabetical", respectively, before). This is the reason we need
to touch so many integration tests. For some of them I decided to adapt the test
assertions to the changed sort order; for others, I added a SetupConfig step to
set the order back to "recency" so that I don't have to change what the test
does (e.g. how many SelectNextItem() calls are needed to get to a certain
branch).
This commit is contained in:
Stefan Haller
2025-07-07 15:37:05 +02:00
parent d79283656d
commit 703256e92d
35 changed files with 161 additions and 66 deletions

View File

@ -399,6 +399,16 @@ git:
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
# How branches are sorted in the local branches view.
# One of: 'date' (default) | 'recency' | 'alphabetical'
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.
localBranchSortOrder: date
# How branches are sorted in the remote branches view.
# One of: 'date' (default) | 'alphabetical'
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
remoteBranchSortOrder: date
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12