mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Provide user config defaults for UI-changeable settings (#4717)
As discussed in #4602, we make a general change to how we treat UI settings that can be changed from within lazygit; previously, the rule was to persist them in State.yml so that they automatically remember the last value that was set in the UI; now, we no longer do this, and instead provide user configs for setting defaults which we fall back to on every start. See #4602 for an in-depth discussion about the pros and cons of either approach, and why we chose this one. As part of this, we change the default for the sort order of branches to date (aka committerdate), both for local and for remote branches (was recency and alphabetical before, respectively). See the discussion starting [here](https://github.com/jesseduffield/lazygit/pull/2147#issuecomment-1656700988) for some reasons. Fixes #4602.
This commit is contained in:
@ -366,6 +366,15 @@ git:
|
||||
allBranchesLogCmds:
|
||||
- git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
|
||||
|
||||
# If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with `<c-w>`.
|
||||
ignoreWhitespaceInDiffView: false
|
||||
|
||||
# The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.
|
||||
diffContextSize: 3
|
||||
|
||||
# The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.
|
||||
renameSimilarityThreshold: 50
|
||||
|
||||
# If true, do not spawn a separate process when using GPG
|
||||
overrideGpg: false
|
||||
|
||||
@ -387,9 +396,32 @@ git:
|
||||
|
||||
# Config for showing the log in the commits view
|
||||
log:
|
||||
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
|
||||
# 'topo-order' makes it easier to read the git log graph, but commits may not
|
||||
# appear chronologically. See https://git-scm.com/docs/
|
||||
#
|
||||
# Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
|
||||
order: topo-order
|
||||
|
||||
# This determines whether the git graph is rendered in the commits panel
|
||||
# One of 'always' | 'never' | 'when-maximised'
|
||||
#
|
||||
# Can be toggled from within lazygit with `Log menu -> Show git graph` (`<c-l>` in the commits window by default).
|
||||
showGraph: always
|
||||
|
||||
# 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
|
||||
|
@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` p `` | Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
| `` <c-p> `` | View custom patch options | |
|
||||
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
|
||||
@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <c-e> `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | Quit | |
|
||||
| `` <esc> `` | Cancel | |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
| `` <c-z> `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
|
||||
@ -65,7 +65,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <space> `` | Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` a `` | Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` <enter> `` | Enter file / Toggle directory collapsed | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
|
||||
| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` - `` | Collapse all files | Collapse all directories in the files tree |
|
||||
| `` = `` | Expand all files | Expand all directories in the file tree |
|
||||
| `` 0 `` | Focus main view | |
|
||||
@ -149,7 +149,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` d `` | Discard | View options for discarding changes to the selected file. |
|
||||
| `` g `` | View upstream reset options | |
|
||||
| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). |
|
||||
| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` <c-t> `` | Open external diff tool (git difftool) | |
|
||||
| `` M `` | Open external merge tool | Run `git mergetool`. |
|
||||
| `` f `` | Fetch | Fetch changes from remote. |
|
||||
|
@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` @ `` | 명령어 로그 메뉴 열기 | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | 푸시 | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` p `` | 업데이트 | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
| `` <c-p> `` | 커스텀 Patch 옵션 보기 | |
|
||||
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
|
||||
@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <c-e> `` | Diff 메뉴 열기 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | 종료 | |
|
||||
| `` <esc> `` | 취소 | |
|
||||
| `` <c-w> `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | 되돌리기 (reflog) (실험적) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
| `` <c-z> `` | 다시 실행 (reflog) (실험적) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
|
||||
@ -331,7 +331,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <space> `` | Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` a `` | Toggle all files included in patch | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` <enter> `` | Enter file to add selected lines to the patch (or toggle directory collapsed) | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
|
||||
| `` ` `` | 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` - `` | Collapse all files | Collapse all directories in the files tree |
|
||||
| `` = `` | Expand all files | Expand all directories in the file tree |
|
||||
| `` 0 `` | Focus main view | |
|
||||
@ -384,7 +384,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` d `` | View 'discard changes' options | View options for discarding changes to the selected file. |
|
||||
| `` g `` | View upstream reset options | |
|
||||
| `` D `` | 초기화 | View reset options for working tree (e.g. nuking the working tree). |
|
||||
| `` ` `` | 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` <c-t> `` | Open external diff tool (git difftool) | |
|
||||
| `` M `` | Git mergetool를 열기 | Run `git mergetool`. |
|
||||
| `` f `` | Fetch | Fetch changes from remote. |
|
||||
|
@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` p `` | Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
| `` <c-p> `` | Bekijk aangepaste patch opties | |
|
||||
| `` m `` | Bekijk merge/rebase opties | View options to abort/continue/skip the current merge/rebase. |
|
||||
@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <c-e> `` | Open diff menu | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | Quit | |
|
||||
| `` <esc> `` | Annuleren | |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | Ongedaan maken (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
| `` <c-z> `` | Redo (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
|
||||
|
||||
@ -75,7 +75,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` d `` | Bekijk 'veranderingen ongedaan maken' opties | View options for discarding changes to the selected file. |
|
||||
| `` g `` | Bekijk upstream reset opties | |
|
||||
| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). |
|
||||
| `` ` `` | Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` <c-t> `` | Open external diff tool (git difftool) | |
|
||||
| `` M `` | Open external merge tool | Run `git mergetool`. |
|
||||
| `` f `` | Fetch | Fetch changes from remote. |
|
||||
@ -141,7 +141,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <space> `` | Toggle bestand inbegrepen in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` a `` | Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` <enter> `` | Enter bestand om geselecteerde regels toe te voegen aan de patch | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
|
||||
| `` ` `` | Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` - `` | Collapse all files | Collapse all directories in the files tree |
|
||||
| `` = `` | Expand all files | Expand all directories in the file tree |
|
||||
| `` 0 `` | Focus main view | |
|
||||
|
@ -14,8 +14,8 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
|
||||
| `` @ `` | Pokaż opcje dziennika poleceń | Pokaż opcje dla dziennika poleceń, np. pokazywanie/ukrywanie dziennika poleceń i skupienie na dzienniku poleceń. |
|
||||
| `` P `` | Wypchnij | Wypchnij bieżącą gałąź do jej gałęzi nadrzędnej. Jeśli nie skonfigurowano gałęzi nadrzędnej, zostaniesz poproszony o skonfigurowanie gałęzi nadrzędnej. |
|
||||
| `` p `` | Pociągnij | Pociągnij zmiany z zdalnego dla bieżącej gałęzi. Jeśli nie skonfigurowano gałęzi nadrzędnej, zostaniesz poproszony o skonfigurowanie gałęzi nadrzędnej. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Zwiększ rozmiar kontekstu w widoku różnic | Zwiększ ilość kontekstu pokazywanego wokół zmian w widoku różnic. |
|
||||
| `` { `` | Zmniejsz rozmiar kontekstu w widoku różnic | Zmniejsz ilość kontekstu pokazywanego wokół zmian w widoku różnic. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
|
@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | Empurre (Push) | Faça push do branch atual para o seu branch upstream. Se nenhum upstream estiver configurado, você será solicitado a configurar um branch a montante. |
|
||||
| `` p `` | Puxar (Pull) | Puxe alterações do controle remoto para o ramo atual. Se nenhum upstream estiver configurado, será solicitado configurar um ramo a montante. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Executar comando da shell | Traga um prompt onde você pode digitar um comando shell para executar. |
|
||||
| `` <c-p> `` | Ver opções de patch personalizadas | |
|
||||
| `` m `` | Ver opções de mesclar/rebase | Ver opções para abortar/continuar/pular o merge/rebase atual. |
|
||||
@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` <c-e> `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | Sair | |
|
||||
| `` <esc> `` | Cancelar | |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | Desfazer | O reflog será usado para determinar qual comando git para executar para desfazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
||||
| `` <c-z> `` | Refazer | O reflog será usado para determinar qual comando git para executar para refazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
|
||||
|
||||
|
@ -14,10 +14,10 @@ _Связки клавиш_
|
||||
| `` @ `` | Открыть меню журнала команд | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | Отправить изменения | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` p `` | Получить и слить изменения | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | Увеличить размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | Уменьшите размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | Увеличить размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | Уменьшите размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
| `` <c-p> `` | Просмотреть пользовательские параметры патча | |
|
||||
| `` m `` | Просмотреть параметры слияния/перебазирования | View options to abort/continue/skip the current merge/rebase. |
|
||||
@ -30,7 +30,7 @@ _Связки клавиш_
|
||||
| `` <c-e> `` | Открыть меню сравнении | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | Выйти | |
|
||||
| `` <esc> `` | Отменить | |
|
||||
| `` <c-w> `` | Переключить отображение изменении пробелов в просмотрщике сравнении | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | Переключить отображение изменении пробелов в просмотрщике сравнении | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | Отменить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git запустить, чтобы отменить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
||||
| `` <c-z> `` | Повторить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git нужно запустить, чтобы повторить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
|
||||
|
||||
@ -291,7 +291,7 @@ _Связки клавиш_
|
||||
| `` <space> `` | Переключить файлы включённые в патч | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` a `` | Переключить все файлы, включённые в патч | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` <enter> `` | Введите файл, чтобы добавить выбранные строки в патч (или свернуть каталог переключения) | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
|
||||
| `` ` `` | Переключить вид дерева файлов | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Переключить вид дерева файлов | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` - `` | Collapse all files | Collapse all directories in the files tree |
|
||||
| `` = `` | Expand all files | Expand all directories in the file tree |
|
||||
| `` 0 `` | Focus main view | |
|
||||
@ -377,7 +377,7 @@ _Связки клавиш_
|
||||
| `` d `` | Просмотреть параметры «отмены изменении» | View options for discarding changes to the selected file. |
|
||||
| `` g `` | Просмотреть параметры сброса upstream-ветки | |
|
||||
| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). |
|
||||
| `` ` `` | Переключить вид дерева файлов | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | Переключить вид дерева файлов | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` <c-t> `` | Open external diff tool (git difftool) | |
|
||||
| `` M `` | Открыть внешний инструмент слияния (git mergetool) | Run `git mergetool`. |
|
||||
| `` f `` | Получить изменения | Fetch changes from remote. |
|
||||
|
@ -14,10 +14,10 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` @ `` | 開啟命令記錄選單 | View options for the command log e.g. show/hide the command log and focus the command log. |
|
||||
| `` P `` | 推送 | 推送到遠端。如果沒有設定遠端,會開啟設定視窗。 |
|
||||
| `` p `` | 拉取 | 從遠端同步當前分支。如果沒有設定遠端,會開啟設定視窗。 |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
|
||||
| `` } `` | 增加差異檢視中顯示變更周圍上下文的大小 | Increase the amount of the context shown around changes in the diff view. |
|
||||
| `` { `` | 減小差異檢視中顯示變更周圍上下文的大小 | Decrease the amount of the context shown around changes in the diff view. |
|
||||
| `` ) `` | Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | 增加差異檢視中顯示變更周圍上下文的大小 | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | 減小差異檢視中顯示變更周圍上下文的大小 | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
|
||||
| `` <c-p> `` | 檢視自訂補丁選項 | |
|
||||
| `` m `` | 查看合併/變基選項 | View options to abort/continue/skip the current merge/rebase. |
|
||||
@ -30,7 +30,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` <c-e> `` | 開啟差異比較選單 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
|
||||
| `` q `` | 結束 | |
|
||||
| `` <esc> `` | 取消 | |
|
||||
| `` <c-w> `` | 切換是否在差異檢視中顯示空格變更 | Toggle whether or not whitespace changes are shown in the diff view. |
|
||||
| `` <c-w> `` | 切換是否在差異檢視中顯示空格變更 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` z `` | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 |
|
||||
| `` <c-z> `` | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 |
|
||||
|
||||
@ -227,7 +227,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` <space> `` | 切換檔案是否包含在補丁中 | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` a `` | 切換所有檔案是否包含在補丁中 | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. |
|
||||
| `` <enter> `` | 輸入檔案以將選定的行添加至補丁(或切換目錄折疊) | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
|
||||
| `` ` `` | 顯示檔案樹狀視圖 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | 顯示檔案樹狀視圖 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` - `` | Collapse all files | Collapse all directories in the files tree |
|
||||
| `` = `` | Expand all files | Expand all directories in the file tree |
|
||||
| `` 0 `` | Focus main view | |
|
||||
@ -336,7 +336,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` d `` | 捨棄 | 檢視選中變動進行捨棄復原 |
|
||||
| `` g `` | 檢視遠端重設選項 | |
|
||||
| `` D `` | 重設 | View reset options for working tree (e.g. nuking the working tree). |
|
||||
| `` ` `` | 顯示檔案樹狀視圖 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
|
||||
| `` ` `` | 顯示檔案樹狀視圖 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` <c-t> `` | 開啟外部差異工具 (git difftool) | |
|
||||
| `` M `` | 開啟外部合併工具 | 執行 `git mergetool`。 |
|
||||
| `` f `` | 擷取 | 同步遠端異動 |
|
||||
|
@ -74,7 +74,7 @@ func (self *BranchLoader) Load(reflogCommits []*models.Commit,
|
||||
) ([]*models.Branch, error) {
|
||||
branches := self.obtainBranches()
|
||||
|
||||
if self.AppState.LocalBranchSortOrder == "recency" {
|
||||
if self.UserConfig().Git.LocalBranchSortOrder == "recency" {
|
||||
reflogBranches := self.obtainReflogBranches(reflogCommits)
|
||||
// loop through reflog branches. If there is a match, merge them, then remove it from the branches and keep it in the reflog branches
|
||||
branchesWithRecency := make([]*models.Branch, 0)
|
||||
@ -254,7 +254,7 @@ func (self *BranchLoader) obtainBranches() []*models.Branch {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
storeCommitDateAsRecency := self.AppState.LocalBranchSortOrder != "recency"
|
||||
storeCommitDateAsRecency := self.UserConfig().Git.LocalBranchSortOrder != "recency"
|
||||
return obtainBranch(split, storeCommitDateAsRecency), true
|
||||
})
|
||||
}
|
||||
@ -268,7 +268,7 @@ func (self *BranchLoader) getRawBranches() (string, error) {
|
||||
)
|
||||
|
||||
var sortOrder string
|
||||
switch strings.ToLower(self.AppState.LocalBranchSortOrder) {
|
||||
switch strings.ToLower(self.UserConfig().Git.LocalBranchSortOrder) {
|
||||
case "recency", "date":
|
||||
sortOrder = "-committerdate"
|
||||
case "alphabetical":
|
||||
|
@ -254,7 +254,7 @@ func (self *CommitCommands) AmendHeadCmdObj() *oscommands.CmdObj {
|
||||
}
|
||||
|
||||
func (self *CommitCommands) ShowCmdObj(hash string, filterPath string) *oscommands.CmdObj {
|
||||
contextSize := self.AppState.DiffContextSize
|
||||
contextSize := self.UserConfig().Git.DiffContextSize
|
||||
|
||||
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
|
||||
cmdArgs := NewGitCmd("show").
|
||||
@ -268,8 +268,8 @@ func (self *CommitCommands) ShowCmdObj(hash string, filterPath string) *oscomman
|
||||
Arg("--decorate").
|
||||
Arg("-p").
|
||||
Arg(hash).
|
||||
ArgIf(self.AppState.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.AppState.RenameSimilarityThreshold)).
|
||||
ArgIf(self.UserConfig().Git.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.UserConfig().Git.RenameSimilarityThreshold)).
|
||||
ArgIf(filterPath != "", "--", filterPath).
|
||||
Dir(self.repoPaths.worktreePath).
|
||||
ToArgv()
|
||||
|
@ -583,7 +583,7 @@ func (self *CommitLoader) getFirstPushedCommit(refName string) (string, error) {
|
||||
|
||||
// getLog gets the git log.
|
||||
func (self *CommitLoader) getLogCmd(opts GetCommitsOptions) *oscommands.CmdObj {
|
||||
gitLogOrder := self.AppState.GitLogOrder
|
||||
gitLogOrder := self.UserConfig().Git.Log.Order
|
||||
|
||||
refSpec := opts.RefName
|
||||
if opts.RefToShowDivergenceFrom != "" {
|
||||
|
@ -9,7 +9,6 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
||||
"github.com/jesseduffield/lazygit/pkg/common"
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stefanhaller/git-todo-parser/todo"
|
||||
@ -298,8 +297,7 @@ func TestGetCommits(t *testing.T) {
|
||||
for _, scenario := range scenarios {
|
||||
t.Run(scenario.testName, func(t *testing.T) {
|
||||
common := common.NewDummyCommon()
|
||||
common.AppState = &config.AppState{}
|
||||
common.AppState.GitLogOrder = scenario.logOrder
|
||||
common.UserConfig().Git.Log.Order = scenario.logOrder
|
||||
cmd := oscommands.NewDummyCmdObjBuilder(scenario.runner)
|
||||
|
||||
builder := &CommitLoader{
|
||||
|
@ -320,16 +320,15 @@ func TestCommitShowCmdObj(t *testing.T) {
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
userConfig := config.GetDefaultConfig()
|
||||
userConfig.Git.Paging.ExternalDiffCommand = s.extDiffCmd
|
||||
appState := &config.AppState{}
|
||||
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
appState.DiffContextSize = s.contextSize
|
||||
appState.RenameSimilarityThreshold = s.similarityThreshold
|
||||
userConfig.Git.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
userConfig.Git.DiffContextSize = s.contextSize
|
||||
userConfig.Git.RenameSimilarityThreshold = s.similarityThreshold
|
||||
|
||||
runner := oscommands.NewFakeRunner(t).ExpectGitArgs(s.expected, "", nil)
|
||||
repoPaths := RepoPaths{
|
||||
worktreePath: "/path/to/worktree",
|
||||
}
|
||||
instance := buildCommitCommands(commonDeps{userConfig: userConfig, appState: appState, runner: runner, repoPaths: &repoPaths})
|
||||
instance := buildCommitCommands(commonDeps{userConfig: userConfig, appState: &config.AppState{}, runner: runner, repoPaths: &repoPaths})
|
||||
|
||||
assert.NoError(t, instance.ShowCmdObj("1234567890", s.filterPath).Run())
|
||||
runner.CheckForMissingCalls()
|
||||
|
@ -21,7 +21,7 @@ func NewDiffCommands(gitCommon *GitCommon) *DiffCommands {
|
||||
func (self *DiffCommands) DiffCmdObj(diffArgs []string) *oscommands.CmdObj {
|
||||
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
|
||||
useExtDiff := extDiffCmd != ""
|
||||
ignoreWhitespace := self.AppState.IgnoreWhitespaceInDiffView
|
||||
ignoreWhitespace := self.UserConfig().Git.IgnoreWhitespaceInDiffView
|
||||
|
||||
return self.cmd.New(
|
||||
NewGitCmd("diff").
|
||||
@ -31,7 +31,7 @@ func (self *DiffCommands) DiffCmdObj(diffArgs []string) *oscommands.CmdObj {
|
||||
Arg("--submodule").
|
||||
Arg(fmt.Sprintf("--color=%s", self.UserConfig().Git.Paging.ColorArg)).
|
||||
ArgIf(ignoreWhitespace, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--unified=%d", self.AppState.DiffContextSize)).
|
||||
Arg(fmt.Sprintf("--unified=%d", self.UserConfig().Git.DiffContextSize)).
|
||||
Arg(diffArgs...).
|
||||
Dir(self.repoPaths.worktreePath).
|
||||
ToArgv(),
|
||||
|
@ -175,7 +175,7 @@ func (self *FileLoader) gitStatus(opts GitStatusOptions) ([]FileStatus, error) {
|
||||
ArgIfElse(
|
||||
opts.NoRenames,
|
||||
"--no-renames",
|
||||
fmt.Sprintf("--find-renames=%d%%", self.AppState.RenameSimilarityThreshold),
|
||||
fmt.Sprintf("--find-renames=%d%%", self.UserConfig().Git.RenameSimilarityThreshold),
|
||||
).
|
||||
ToArgv()
|
||||
|
||||
|
@ -198,17 +198,12 @@ func TestFileGetStatusFiles(t *testing.T) {
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
cmd := oscommands.NewDummyCmdObjBuilder(s.runner)
|
||||
|
||||
appState := &config.AppState{}
|
||||
appState.RenameSimilarityThreshold = s.similarityThreshold
|
||||
|
||||
userConfig := &config.UserConfig{
|
||||
Gui: config.GuiConfig{
|
||||
ShowNumstatInFilesView: s.showNumstatInFilesView,
|
||||
},
|
||||
}
|
||||
userConfig := &config.UserConfig{}
|
||||
userConfig.Gui.ShowNumstatInFilesView = s.showNumstatInFilesView
|
||||
userConfig.Git.RenameSimilarityThreshold = s.similarityThreshold
|
||||
|
||||
loader := &FileLoader{
|
||||
GitCommon: buildGitCommon(commonDeps{appState: appState, userConfig: userConfig}),
|
||||
GitCommon: buildGitCommon(commonDeps{appState: &config.AppState{}, userConfig: userConfig}),
|
||||
cmd: cmd,
|
||||
config: &FakeFileLoaderConfig{showUntrackedFiles: "yes"},
|
||||
getFileType: func(string) string { return "file" },
|
||||
|
@ -85,7 +85,7 @@ func (self *RemoteLoader) getRemoteBranchesByRemoteName() (map[string][]*models.
|
||||
remoteBranchesByRemoteName := make(map[string][]*models.RemoteBranch)
|
||||
|
||||
var sortOrder string
|
||||
switch strings.ToLower(self.AppState.RemoteBranchSortOrder) {
|
||||
switch strings.ToLower(self.UserConfig().Git.RemoteBranchSortOrder) {
|
||||
case "alphabetical":
|
||||
sortOrder = "refname"
|
||||
case "date":
|
||||
|
@ -87,9 +87,9 @@ func (self *StashCommands) ShowStashEntryCmdObj(index int) *oscommands.CmdObj {
|
||||
Arg("--stat").
|
||||
Arg("-u").
|
||||
Arg(fmt.Sprintf("--color=%s", self.UserConfig().Git.Paging.ColorArg)).
|
||||
Arg(fmt.Sprintf("--unified=%d", self.AppState.DiffContextSize)).
|
||||
ArgIf(self.AppState.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.AppState.RenameSimilarityThreshold)).
|
||||
Arg(fmt.Sprintf("--unified=%d", self.UserConfig().Git.DiffContextSize)).
|
||||
ArgIf(self.UserConfig().Git.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.UserConfig().Git.RenameSimilarityThreshold)).
|
||||
Arg(fmt.Sprintf("refs/stash@{%d}", index)).
|
||||
Dir(self.repoPaths.worktreePath).
|
||||
ToArgv()
|
||||
|
@ -144,14 +144,13 @@ func TestStashStashEntryCmdObj(t *testing.T) {
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
userConfig := config.GetDefaultConfig()
|
||||
appState := &config.AppState{}
|
||||
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
appState.DiffContextSize = s.contextSize
|
||||
appState.RenameSimilarityThreshold = s.similarityThreshold
|
||||
userConfig.Git.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
userConfig.Git.DiffContextSize = s.contextSize
|
||||
userConfig.Git.RenameSimilarityThreshold = s.similarityThreshold
|
||||
repoPaths := RepoPaths{
|
||||
worktreePath: "/path/to/worktree",
|
||||
}
|
||||
instance := buildStashCommands(commonDeps{userConfig: userConfig, appState: appState, repoPaths: &repoPaths})
|
||||
instance := buildStashCommands(commonDeps{userConfig: userConfig, appState: &config.AppState{}, repoPaths: &repoPaths})
|
||||
|
||||
cmdStr := instance.ShowStashEntryCmdObj(s.index).Args()
|
||||
assert.Equal(t, s.expected, cmdStr)
|
||||
|
@ -260,7 +260,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
|
||||
colorArg = "never"
|
||||
}
|
||||
|
||||
contextSize := self.AppState.DiffContextSize
|
||||
contextSize := self.UserConfig().Git.DiffContextSize
|
||||
prevPath := node.GetPreviousPath()
|
||||
noIndex := !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile()
|
||||
extDiffCmd := self.UserConfig().Git.Paging.ExternalDiffCommand
|
||||
@ -272,8 +272,8 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
|
||||
Arg("--submodule").
|
||||
Arg(fmt.Sprintf("--unified=%d", contextSize)).
|
||||
Arg(fmt.Sprintf("--color=%s", colorArg)).
|
||||
ArgIf(!plain && self.AppState.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.AppState.RenameSimilarityThreshold)).
|
||||
ArgIf(!plain && self.UserConfig().Git.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg(fmt.Sprintf("--find-renames=%d%%", self.UserConfig().Git.RenameSimilarityThreshold)).
|
||||
ArgIf(cached, "--cached").
|
||||
ArgIf(noIndex, "--no-index").
|
||||
Arg("--").
|
||||
@ -293,7 +293,7 @@ func (self *WorkingTreeCommands) ShowFileDiff(from string, to string, reverse bo
|
||||
}
|
||||
|
||||
func (self *WorkingTreeCommands) ShowFileDiffCmdObj(from string, to string, reverse bool, fileName string, plain bool) *oscommands.CmdObj {
|
||||
contextSize := self.AppState.DiffContextSize
|
||||
contextSize := self.UserConfig().Git.DiffContextSize
|
||||
|
||||
colorArg := self.UserConfig().Git.Paging.ColorArg
|
||||
if plain {
|
||||
@ -314,7 +314,7 @@ func (self *WorkingTreeCommands) ShowFileDiffCmdObj(from string, to string, reve
|
||||
Arg(from).
|
||||
Arg(to).
|
||||
ArgIf(reverse, "-R").
|
||||
ArgIf(!plain && self.AppState.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
ArgIf(!plain && self.UserConfig().Git.IgnoreWhitespaceInDiffView, "--ignore-all-space").
|
||||
Arg("--").
|
||||
Arg(fileName).
|
||||
Dir(self.repoPaths.worktreePath).
|
||||
|
@ -327,15 +327,14 @@ func TestWorkingTreeDiff(t *testing.T) {
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
userConfig := config.GetDefaultConfig()
|
||||
appState := &config.AppState{}
|
||||
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
appState.DiffContextSize = s.contextSize
|
||||
appState.RenameSimilarityThreshold = s.similarityThreshold
|
||||
userConfig.Git.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
userConfig.Git.DiffContextSize = s.contextSize
|
||||
userConfig.Git.RenameSimilarityThreshold = s.similarityThreshold
|
||||
repoPaths := RepoPaths{
|
||||
worktreePath: "/path/to/worktree",
|
||||
}
|
||||
|
||||
instance := buildWorkingTreeCommands(commonDeps{runner: s.runner, userConfig: userConfig, appState: appState, repoPaths: &repoPaths})
|
||||
instance := buildWorkingTreeCommands(commonDeps{runner: s.runner, userConfig: userConfig, appState: &config.AppState{}, repoPaths: &repoPaths})
|
||||
result := instance.WorktreeFileDiff(s.file, s.plain, s.cached)
|
||||
assert.Equal(t, expectedResult, result)
|
||||
s.runner.CheckForMissingCalls()
|
||||
@ -396,14 +395,13 @@ func TestWorkingTreeShowFileDiff(t *testing.T) {
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
userConfig := config.GetDefaultConfig()
|
||||
appState := &config.AppState{}
|
||||
appState.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
appState.DiffContextSize = s.contextSize
|
||||
userConfig.Git.IgnoreWhitespaceInDiffView = s.ignoreWhitespace
|
||||
userConfig.Git.DiffContextSize = s.contextSize
|
||||
repoPaths := RepoPaths{
|
||||
worktreePath: "/path/to/worktree",
|
||||
}
|
||||
|
||||
instance := buildWorkingTreeCommands(commonDeps{runner: s.runner, userConfig: userConfig, appState: appState, repoPaths: &repoPaths})
|
||||
instance := buildWorkingTreeCommands(commonDeps{runner: s.runner, userConfig: userConfig, appState: &config.AppState{}, repoPaths: &repoPaths})
|
||||
|
||||
result, err := instance.ShowFileDiff(s.from, s.to, s.reverse, "test.txt", s.plain)
|
||||
assert.NoError(t, err)
|
||||
|
@ -107,17 +107,6 @@ func NewAppConfig(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Temporary: the defaults for these are set to empty strings in
|
||||
// getDefaultAppState so that we can migrate them from userConfig (which is
|
||||
// now deprecated). Once we remove the user configs, we can remove this code
|
||||
// and set the proper defaults in getDefaultAppState.
|
||||
if appState.GitLogOrder == "" {
|
||||
appState.GitLogOrder = userConfig.Git.Log.Order
|
||||
}
|
||||
if appState.GitLogShowGraph == "" {
|
||||
appState.GitLogShowGraph = userConfig.Git.Log.ShowGraph
|
||||
}
|
||||
|
||||
appConfig := &AppConfig{
|
||||
name: name,
|
||||
version: version,
|
||||
@ -676,35 +665,15 @@ type AppState struct {
|
||||
// For backwards compatibility we keep the old name in yaml files.
|
||||
ShellCommandsHistory []string `yaml:"customcommandshistory"`
|
||||
|
||||
HideCommandLog bool
|
||||
IgnoreWhitespaceInDiffView bool
|
||||
DiffContextSize uint64
|
||||
RenameSimilarityThreshold int
|
||||
LocalBranchSortOrder string
|
||||
RemoteBranchSortOrder string
|
||||
|
||||
// One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
|
||||
// 'topo-order' makes it easier to read the git log graph, but commits may not
|
||||
// appear chronologically. See https://git-scm.com/docs/
|
||||
GitLogOrder string
|
||||
|
||||
// This determines whether the git graph is rendered in the commits panel
|
||||
// One of 'always' | 'never' | 'when-maximised'
|
||||
GitLogShowGraph string
|
||||
HideCommandLog bool
|
||||
}
|
||||
|
||||
func getDefaultAppState() *AppState {
|
||||
return &AppState{
|
||||
LastUpdateCheck: 0,
|
||||
RecentRepos: []string{},
|
||||
StartupPopupVersion: 0,
|
||||
LastVersion: "",
|
||||
DiffContextSize: 3,
|
||||
RenameSimilarityThreshold: 50,
|
||||
LocalBranchSortOrder: "recency",
|
||||
RemoteBranchSortOrder: "alphabetical",
|
||||
GitLogOrder: "", // should be "topo-order" eventually
|
||||
GitLogShowGraph: "", // should be "always" eventually
|
||||
LastUpdateCheck: 0,
|
||||
RecentRepos: []string{},
|
||||
StartupPopupVersion: 0,
|
||||
LastVersion: "",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,6 +264,12 @@ type GitConfig struct {
|
||||
BranchLogCmd string `yaml:"branchLogCmd"`
|
||||
// Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)
|
||||
AllBranchesLogCmds []string `yaml:"allBranchesLogCmds"`
|
||||
// If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with `<c-w>`.
|
||||
IgnoreWhitespaceInDiffView bool `yaml:"ignoreWhitespaceInDiffView"`
|
||||
// The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.
|
||||
DiffContextSize uint64 `yaml:"diffContextSize"`
|
||||
// The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.
|
||||
RenameSimilarityThreshold int `yaml:"renameSimilarityThreshold" jsonschema:"minimum=0,maximum=100"`
|
||||
// If true, do not spawn a separate process when using GPG
|
||||
OverrideGpg bool `yaml:"overrideGpg"`
|
||||
// If true, do not allow force pushes
|
||||
@ -279,6 +285,14 @@ type GitConfig struct {
|
||||
ParseEmoji bool `yaml:"parseEmoji"`
|
||||
// Config for showing the log in the commits view
|
||||
Log LogConfig `yaml:"log"`
|
||||
// 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 string `yaml:"localBranchSortOrder" jsonschema:"enum=date,enum=recency,enum=alphabetical"`
|
||||
// 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 string `yaml:"remoteBranchSortOrder" jsonschema:"enum=date,enum=alphabetical"`
|
||||
// When copying commit hashes to the clipboard, truncate them to this
|
||||
// length. Set to 40 to disable truncation.
|
||||
TruncateCopiedCommitHashesTo int `yaml:"truncateCopiedCommitHashesTo"`
|
||||
@ -332,13 +346,13 @@ type LogConfig struct {
|
||||
// 'topo-order' makes it easier to read the git log graph, but commits may not
|
||||
// appear chronologically. See https://git-scm.com/docs/
|
||||
//
|
||||
// Deprecated: Configure this with `Log menu -> Commit sort order` (<c-l> in the commits window by default).
|
||||
Order string `yaml:"order" jsonschema:"deprecated,enum=date-order,enum=author-date-order,enum=topo-order,enum=default,deprecated"`
|
||||
// Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
|
||||
Order string `yaml:"order" jsonschema:"enum=date-order,enum=author-date-order,enum=topo-order,enum=default"`
|
||||
// This determines whether the git graph is rendered in the commits panel
|
||||
// One of 'always' | 'never' | 'when-maximised'
|
||||
//
|
||||
// Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
|
||||
ShowGraph string `yaml:"showGraph" jsonschema:"deprecated,enum=always,enum=never,enum=when-maximised"`
|
||||
// Can be toggled from within lazygit with `Log menu -> Show git graph` (`<c-l>` in the commits window by default).
|
||||
ShowGraph string `yaml:"showGraph" jsonschema:"enum=always,enum=never,enum=when-maximised"`
|
||||
// displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
|
||||
ShowWholeGraph bool `yaml:"showWholeGraph"`
|
||||
}
|
||||
@ -799,6 +813,8 @@ func GetDefaultConfig() *UserConfig {
|
||||
ShowGraph: "always",
|
||||
ShowWholeGraph: false,
|
||||
},
|
||||
LocalBranchSortOrder: "date",
|
||||
RemoteBranchSortOrder: "date",
|
||||
SkipHookPrefix: "WIP",
|
||||
MainBranches: []string{"master", "main"},
|
||||
AutoFetch: true,
|
||||
@ -808,6 +824,9 @@ func GetDefaultConfig() *UserConfig {
|
||||
AutoStageResolvedConflicts: true,
|
||||
BranchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --",
|
||||
AllBranchesLogCmds: []string{"git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium"},
|
||||
IgnoreWhitespaceInDiffView: false,
|
||||
DiffContextSize: 3,
|
||||
RenameSimilarityThreshold: 50,
|
||||
DisableForcePushing: false,
|
||||
CommitPrefixes: map[string][]CommitPrefixConfig(nil),
|
||||
BranchPrefix: "",
|
||||
|
@ -23,6 +23,22 @@ func (config *UserConfig) Validate() error {
|
||||
[]string{"none", "onlyMainBranches", "allBranches"}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateEnum("git.localBranchSortOrder", config.Git.LocalBranchSortOrder,
|
||||
[]string{"date", "recency", "alphabetical"}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateEnum("git.remoteBranchSortOrder", config.Git.RemoteBranchSortOrder,
|
||||
[]string{"date", "alphabetical"}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateEnum("git.log.order", config.Git.Log.Order,
|
||||
[]string{"date-order", "author-date-order", "topo-order", "default"}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateEnum("git.log.showGraph", config.Git.Log.ShowGraph,
|
||||
[]string{"always", "never", "when-maximised"}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateKeybindings(config.Keybinding); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -30,6 +30,87 @@ func TestUserConfigValidate_enums(t *testing.T) {
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Gui.ShowDivergenceFromBaseBranch",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Gui.ShowDivergenceFromBaseBranch = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "none", valid: true},
|
||||
{value: "onlyArrow", valid: true},
|
||||
{value: "arrowAndNumber", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.AutoForwardBranches",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.AutoForwardBranches = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "none", valid: true},
|
||||
{value: "onlyMainBranches", valid: true},
|
||||
{value: "allBranches", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.LocalBranchSortOrder",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.LocalBranchSortOrder = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "date", valid: true},
|
||||
{value: "recency", valid: true},
|
||||
{value: "alphabetical", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.RemoteBranchSortOrder",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.RemoteBranchSortOrder = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "date", valid: true},
|
||||
{value: "recency", valid: false},
|
||||
{value: "alphabetical", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.Log.Order",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.Log.Order = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "date-order", valid: true},
|
||||
{value: "author-date-order", valid: true},
|
||||
{value: "topo-order", valid: true},
|
||||
{value: "default", valid: true},
|
||||
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.Log.ShowGraph",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.Log.ShowGraph = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "always", valid: true},
|
||||
{value: "never", valid: true},
|
||||
{value: "when-maximised", valid: true},
|
||||
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Keybindings",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
|
@ -251,7 +251,7 @@ func shouldShowGraph(c *ContextCommon) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
value := c.GetAppState().GitLogShowGraph
|
||||
value := c.UserConfig().Git.Log.ShowGraph
|
||||
|
||||
switch value {
|
||||
case "always":
|
||||
|
@ -140,6 +140,7 @@ func (self *BranchesController) GetKeybindings(opts types.KeybindingsOpts) []*ty
|
||||
Key: opts.GetKey(opts.Config.Branches.SortOrder),
|
||||
Handler: self.createSortMenu,
|
||||
Description: self.c.Tr.SortOrder,
|
||||
OpensMenu: true,
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
|
||||
@ -672,17 +673,19 @@ func (self *BranchesController) createTag(branch *models.Branch) error {
|
||||
}
|
||||
|
||||
func (self *BranchesController) createSortMenu() error {
|
||||
return self.c.Helpers().Refs.CreateSortOrderMenu([]string{"recency", "alphabetical", "date"}, func(sortOrder string) error {
|
||||
if self.c.GetAppState().LocalBranchSortOrder != sortOrder {
|
||||
self.c.GetAppState().LocalBranchSortOrder = sortOrder
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}})
|
||||
return self.c.Helpers().Refs.CreateSortOrderMenu(
|
||||
[]string{"recency", "alphabetical", "date"},
|
||||
self.c.Tr.SortOrderPromptLocalBranches,
|
||||
func(sortOrder string) error {
|
||||
if self.c.UserConfig().Git.LocalBranchSortOrder != sortOrder {
|
||||
self.c.UserConfig().Git.LocalBranchSortOrder = sortOrder
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}})
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
},
|
||||
self.c.GetAppState().LocalBranchSortOrder)
|
||||
},
|
||||
self.c.UserConfig().Git.LocalBranchSortOrder)
|
||||
}
|
||||
|
||||
func (self *BranchesController) createResetMenu(selectedBranch *models.Branch) error {
|
||||
|
@ -378,7 +378,7 @@ func (self *CommitFilesController) openDiffTool(node *filetree.CommitFileNode) e
|
||||
}
|
||||
|
||||
func (self *CommitFilesController) toggleForPatch(selectedNodes []*filetree.CommitFileNode) error {
|
||||
if self.c.AppState.DiffContextSize == 0 {
|
||||
if self.c.UserConfig().Git.DiffContextSize == 0 {
|
||||
return fmt.Errorf(self.c.Tr.Actions.NotEnoughContextForCustomPatch,
|
||||
keybindings.Label(self.c.UserConfig().Keybinding.Universal.IncreaseContextInDiffView))
|
||||
}
|
||||
@ -472,7 +472,7 @@ func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode
|
||||
return self.handleToggleCommitFileDirCollapsed(node)
|
||||
}
|
||||
|
||||
if self.c.AppState.DiffContextSize == 0 {
|
||||
if self.c.UserConfig().Git.DiffContextSize == 0 {
|
||||
return fmt.Errorf(self.c.Tr.Actions.NotEnoughContextForCustomPatch,
|
||||
keybindings.Label(self.c.UserConfig().Keybinding.Universal.IncreaseContextInDiffView))
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ func (self *ContextLinesController) Increase() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if self.c.AppState.DiffContextSize < math.MaxUint64 {
|
||||
self.c.AppState.DiffContextSize++
|
||||
if self.c.UserConfig().Git.DiffContextSize < math.MaxUint64 {
|
||||
self.c.UserConfig().Git.DiffContextSize++
|
||||
}
|
||||
return self.applyChange()
|
||||
}
|
||||
@ -86,8 +86,8 @@ func (self *ContextLinesController) Decrease() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if self.c.AppState.DiffContextSize > 0 {
|
||||
self.c.AppState.DiffContextSize--
|
||||
if self.c.UserConfig().Git.DiffContextSize > 0 {
|
||||
self.c.UserConfig().Git.DiffContextSize--
|
||||
}
|
||||
return self.applyChange()
|
||||
}
|
||||
@ -96,8 +96,7 @@ func (self *ContextLinesController) Decrease() error {
|
||||
}
|
||||
|
||||
func (self *ContextLinesController) applyChange() error {
|
||||
self.c.Toast(fmt.Sprintf(self.c.Tr.DiffContextSizeChanged, self.c.AppState.DiffContextSize))
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.Toast(fmt.Sprintf(self.c.Tr.DiffContextSizeChanged, self.c.UserConfig().Git.DiffContextSize))
|
||||
|
||||
currentContext := self.currentSidePanel()
|
||||
switch currentContext.GetKey() {
|
||||
|
@ -144,7 +144,7 @@ func (self *DiffHelper) WithDiffModeCheck(f func()) {
|
||||
}
|
||||
|
||||
func (self *DiffHelper) IgnoringWhitespaceSubTitle() string {
|
||||
if self.c.GetAppState().IgnoreWhitespaceInDiffView {
|
||||
if self.c.UserConfig().Git.IgnoreWhitespaceInDiffView {
|
||||
return self.c.Tr.IgnoreWhitespaceDiffViewSubTitle
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) {
|
||||
refresh("commits and commit files", self.refreshCommitsAndCommitFiles)
|
||||
|
||||
includeWorktreesWithBranches = scopeSet.Includes(types.WORKTREES)
|
||||
if self.c.AppState.LocalBranchSortOrder == "recency" {
|
||||
if self.c.UserConfig().Git.LocalBranchSortOrder == "recency" {
|
||||
refresh("reflog and branches", func() { self.refreshReflogAndBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex) })
|
||||
} else {
|
||||
refresh("branches", func() { self.refreshBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex, true) })
|
||||
@ -446,7 +446,7 @@ func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSele
|
||||
defer self.c.Mutexes().RefreshingBranchesMutex.Unlock()
|
||||
|
||||
reflogCommits := self.c.Model().FilteredReflogCommits
|
||||
if self.c.Modes().Filtering.Active() && self.c.AppState.LocalBranchSortOrder == "recency" {
|
||||
if self.c.Modes().Filtering.Active() && self.c.UserConfig().Git.LocalBranchSortOrder == "recency" {
|
||||
// in filter mode we filter our reflog commits to just those containing the path
|
||||
// however we need all the reflog entries to populate the recencies of our branches
|
||||
// which allows us to order them correctly. So if we're filtering we'll just
|
||||
|
@ -186,7 +186,7 @@ func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *RefsHelper) CreateSortOrderMenu(sortOptionsOrder []string, onSelected func(sortOrder string) error, currentValue string) error {
|
||||
func (self *RefsHelper) CreateSortOrderMenu(sortOptionsOrder []string, menuPrompt string, onSelected func(sortOrder string) error, currentValue string) error {
|
||||
type sortMenuOption struct {
|
||||
key types.Key
|
||||
label string
|
||||
@ -222,8 +222,9 @@ func (self *RefsHelper) CreateSortOrderMenu(sortOptionsOrder []string, onSelecte
|
||||
}
|
||||
})
|
||||
return self.c.Menu(types.CreateMenuOptions{
|
||||
Title: self.c.Tr.SortOrder,
|
||||
Items: menuItems,
|
||||
Title: self.c.Tr.SortOrder,
|
||||
Items: menuItems,
|
||||
Prompt: menuPrompt,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1180,13 +1180,13 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.ShowGitGraph,
|
||||
Tooltip: self.c.Tr.ShowGitGraphTooltip,
|
||||
OpensMenu: true,
|
||||
OnPress: func() error {
|
||||
currentValue := self.c.GetAppState().GitLogShowGraph
|
||||
currentValue := self.c.UserConfig().Git.Log.ShowGraph
|
||||
onPress := func(value string) func() error {
|
||||
return func() error {
|
||||
self.c.GetAppState().GitLogShowGraph = value
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.UserConfig().Git.Log.ShowGraph = value
|
||||
self.c.PostRefreshUpdate(self.c.Contexts().LocalCommits)
|
||||
self.c.PostRefreshUpdate(self.c.Contexts().SubCommits)
|
||||
return nil
|
||||
@ -1216,13 +1216,13 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.SortCommits,
|
||||
Tooltip: self.c.Tr.SortCommitsTooltip,
|
||||
OpensMenu: true,
|
||||
OnPress: func() error {
|
||||
currentValue := self.c.GetAppState().GitLogOrder
|
||||
currentValue := self.c.UserConfig().Git.Log.Order
|
||||
onPress := func(value string) func() error {
|
||||
return func() error {
|
||||
self.c.GetAppState().GitLogOrder = value
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.UserConfig().Git.Log.Order = value
|
||||
return self.c.WithWaitingStatus(self.c.Tr.LoadingCommits, func(gocui.Task) error {
|
||||
self.c.Refresh(
|
||||
types.RefreshOptions{
|
||||
|
@ -145,16 +145,18 @@ func (self *RemoteBranchesController) rebase(selectedBranch *models.RemoteBranch
|
||||
}
|
||||
|
||||
func (self *RemoteBranchesController) createSortMenu() error {
|
||||
return self.c.Helpers().Refs.CreateSortOrderMenu([]string{"alphabetical", "date"}, func(sortOrder string) error {
|
||||
if self.c.GetAppState().RemoteBranchSortOrder != sortOrder {
|
||||
self.c.GetAppState().RemoteBranchSortOrder = sortOrder
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.Contexts().RemoteBranches.SetSelection(0)
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.REMOTES}})
|
||||
}
|
||||
return nil
|
||||
},
|
||||
self.c.GetAppState().RemoteBranchSortOrder)
|
||||
return self.c.Helpers().Refs.CreateSortOrderMenu(
|
||||
[]string{"alphabetical", "date"},
|
||||
self.c.Tr.SortOrderPromptRemoteBranches,
|
||||
func(sortOrder string) error {
|
||||
if self.c.UserConfig().Git.RemoteBranchSortOrder != sortOrder {
|
||||
self.c.UserConfig().Git.RemoteBranchSortOrder = sortOrder
|
||||
self.c.Contexts().RemoteBranches.SetSelection(0)
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.REMOTES}})
|
||||
}
|
||||
return nil
|
||||
},
|
||||
self.c.UserConfig().Git.RemoteBranchSortOrder)
|
||||
}
|
||||
|
||||
func (self *RemoteBranchesController) createResetMenu(selectedBranch *models.RemoteBranch) error {
|
||||
|
@ -59,10 +59,10 @@ func (self *RenameSimilarityThresholdController) Context() types.Context {
|
||||
}
|
||||
|
||||
func (self *RenameSimilarityThresholdController) Increase() error {
|
||||
old_size := self.c.AppState.RenameSimilarityThreshold
|
||||
old_size := self.c.UserConfig().Git.RenameSimilarityThreshold
|
||||
|
||||
if self.isShowingRenames() && old_size < 100 {
|
||||
self.c.AppState.RenameSimilarityThreshold = min(100, old_size+5)
|
||||
self.c.UserConfig().Git.RenameSimilarityThreshold = min(100, old_size+5)
|
||||
return self.applyChange()
|
||||
}
|
||||
|
||||
@ -70,10 +70,10 @@ func (self *RenameSimilarityThresholdController) Increase() error {
|
||||
}
|
||||
|
||||
func (self *RenameSimilarityThresholdController) Decrease() error {
|
||||
old_size := self.c.AppState.RenameSimilarityThreshold
|
||||
old_size := self.c.UserConfig().Git.RenameSimilarityThreshold
|
||||
|
||||
if self.isShowingRenames() && old_size > 5 {
|
||||
self.c.AppState.RenameSimilarityThreshold = max(5, old_size-5)
|
||||
self.c.UserConfig().Git.RenameSimilarityThreshold = max(5, old_size-5)
|
||||
return self.applyChange()
|
||||
}
|
||||
|
||||
@ -81,8 +81,7 @@ func (self *RenameSimilarityThresholdController) Decrease() error {
|
||||
}
|
||||
|
||||
func (self *RenameSimilarityThresholdController) applyChange() error {
|
||||
self.c.Toast(fmt.Sprintf(self.c.Tr.RenameSimilarityThresholdChanged, self.c.AppState.RenameSimilarityThreshold))
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.Toast(fmt.Sprintf(self.c.Tr.RenameSimilarityThresholdChanged, self.c.UserConfig().Git.RenameSimilarityThreshold))
|
||||
|
||||
currentContext := self.currentSidePanel()
|
||||
switch currentContext.GetKey() {
|
||||
|
@ -187,7 +187,7 @@ func (self *StagingController) TogglePanel() error {
|
||||
}
|
||||
|
||||
func (self *StagingController) ToggleStaged() error {
|
||||
if self.c.AppState.DiffContextSize == 0 {
|
||||
if self.c.UserConfig().Git.DiffContextSize == 0 {
|
||||
return fmt.Errorf(self.c.Tr.Actions.NotEnoughContextToStage,
|
||||
keybindings.Label(self.c.UserConfig().Keybinding.Universal.IncreaseContextInDiffView))
|
||||
}
|
||||
@ -196,7 +196,7 @@ func (self *StagingController) ToggleStaged() error {
|
||||
}
|
||||
|
||||
func (self *StagingController) DiscardSelection() error {
|
||||
if self.c.AppState.DiffContextSize == 0 {
|
||||
if self.c.UserConfig().Git.DiffContextSize == 0 {
|
||||
return fmt.Errorf(self.c.Tr.Actions.NotEnoughContextToDiscard,
|
||||
keybindings.Label(self.c.UserConfig().Keybinding.Universal.IncreaseContextInDiffView))
|
||||
}
|
||||
|
@ -25,8 +25,7 @@ func (self *ToggleWhitespaceAction) Call() error {
|
||||
return errors.New(self.c.Tr.IgnoreWhitespaceNotSupportedHere)
|
||||
}
|
||||
|
||||
self.c.GetAppState().IgnoreWhitespaceInDiffView = !self.c.GetAppState().IgnoreWhitespaceInDiffView
|
||||
self.c.SaveAppStateAndLogError()
|
||||
self.c.UserConfig().Git.IgnoreWhitespaceInDiffView = !self.c.UserConfig().Git.IgnoreWhitespaceInDiffView
|
||||
|
||||
self.c.Context().CurrentSide().HandleFocus(types.OnFocusOpts{})
|
||||
return nil
|
||||
|
@ -758,12 +758,17 @@ type TranslationSet struct {
|
||||
LogMenuTitle string
|
||||
ToggleShowGitGraphAll string
|
||||
ShowGitGraph string
|
||||
ShowGitGraphTooltip string
|
||||
SortOrder string
|
||||
SortOrderPromptLocalBranches string
|
||||
SortOrderPromptRemoteBranches string
|
||||
SortAlphabetical string
|
||||
SortByDate string
|
||||
SortByRecency string
|
||||
SortBasedOnReflog string
|
||||
SortOrderPrompt string
|
||||
SortCommits string
|
||||
SortCommitsTooltip string
|
||||
CantChangeContextSizeError string
|
||||
OpenCommitInBrowser string
|
||||
ViewBisectOptions string
|
||||
@ -1098,7 +1103,7 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
ToggleStagedAll: "Stage all",
|
||||
ToggleStagedAllTooltip: "Toggle staged/unstaged for all files in working tree.",
|
||||
ToggleTreeView: "Toggle file tree view",
|
||||
ToggleTreeViewTooltip: "Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.",
|
||||
ToggleTreeViewTooltip: "Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.\n\nThe default can be changed in the config file with the key 'gui.showFileTree'.",
|
||||
OpenDiffTool: "Open external diff tool (git difftool)",
|
||||
OpenMergeTool: "Open external merge tool",
|
||||
OpenMergeToolTooltip: "Run `git mergetool`.",
|
||||
@ -1771,17 +1776,17 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
CommandLogHeader: "You can hide/focus this panel by pressing '%s'\n",
|
||||
RandomTip: "Random tip",
|
||||
ToggleWhitespaceInDiffView: "Toggle whitespace",
|
||||
ToggleWhitespaceInDiffViewTooltip: "Toggle whether or not whitespace changes are shown in the diff view.",
|
||||
ToggleWhitespaceInDiffViewTooltip: "Toggle whether or not whitespace changes are shown in the diff view.\n\nThe default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.",
|
||||
IgnoreWhitespaceDiffViewSubTitle: "(ignoring whitespace)",
|
||||
IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view",
|
||||
IncreaseContextInDiffView: "Increase diff context size",
|
||||
IncreaseContextInDiffViewTooltip: "Increase the amount of the context shown around changes in the diff view.",
|
||||
IncreaseContextInDiffViewTooltip: "Increase the amount of the context shown around changes in the diff view.\n\nThe default can be changed in the config file with the key 'git.diffContextSize'.",
|
||||
DecreaseContextInDiffView: "Decrease diff context size",
|
||||
DecreaseContextInDiffViewTooltip: "Decrease the amount of the context shown around changes in the diff view.",
|
||||
DecreaseContextInDiffViewTooltip: "Decrease the amount of the context shown around changes in the diff view.\n\nThe default can be changed in the config file with the key 'git.diffContextSize'.",
|
||||
DiffContextSizeChanged: "Changed diff context size to %d",
|
||||
IncreaseRenameSimilarityThresholdTooltip: "Increase the similarity threshold for a deletion and addition pair to be treated as a rename.",
|
||||
IncreaseRenameSimilarityThresholdTooltip: "Increase the similarity threshold for a deletion and addition pair to be treated as a rename.\n\nThe default can be changed in the config file with the key 'git.renameSimilarityThreshold'.",
|
||||
IncreaseRenameSimilarityThreshold: "Increase rename similarity threshold",
|
||||
DecreaseRenameSimilarityThresholdTooltip: "Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.",
|
||||
DecreaseRenameSimilarityThresholdTooltip: "Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.\n\nThe default can be changed in the config file with the key 'git.renameSimilarityThreshold'.",
|
||||
DecreaseRenameSimilarityThreshold: "Decrease rename similarity threshold",
|
||||
RenameSimilarityThresholdChanged: "Changed rename similarity threshold to %d%%",
|
||||
CreatePullRequestOptions: "View create pull request options",
|
||||
@ -1803,12 +1808,16 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
LogMenuTitle: "Commit Log Options",
|
||||
ToggleShowGitGraphAll: "Toggle show whole git graph (pass the `--all` flag to `git log`)",
|
||||
ShowGitGraph: "Show git graph",
|
||||
ShowGitGraphTooltip: "Show or hide the git graph in the commit log.\n\nThe default can be changed in the config file with the key 'git.log.showGraph'.",
|
||||
SortOrder: "Sort order",
|
||||
SortOrderPromptLocalBranches: "The default sort order for local branches can be set in the config file with the key 'git.localBranchSortOrder'.",
|
||||
SortOrderPromptRemoteBranches: "The default sort order for remote branches can be set in the config file with the key 'git.remoteBranchSortOrder'.",
|
||||
SortAlphabetical: "Alphabetical",
|
||||
SortByDate: "Date",
|
||||
SortByRecency: "Recency",
|
||||
SortBasedOnReflog: "(based on reflog)",
|
||||
SortCommits: "Commit sort order",
|
||||
SortCommitsTooltip: "Change the sort order of the commits in the commit log.\n\nThe default can be changed in the config file with the key 'git.log.sortOrder'.",
|
||||
CantChangeContextSizeError: "Cannot change context while in patch building mode because we were too lazy to support it when releasing the feature. If you really want it, please let us know!",
|
||||
OpenCommitInBrowser: "Open commit in browser",
|
||||
ViewBisectOptions: "View bisect options",
|
||||
@ -2102,6 +2111,11 @@ git:
|
||||
|
||||
If, on the other hand, you want this even for feature branches, you can set it to 'allBranches' instead.`,
|
||||
"0.51.0": `- The 'subprocess', 'stream', and 'showOutput' fields of custom commands have been replaced by a single 'output' field. This should be transparent, if you used these in your config file it should have been automatically updated for you. There's one notable change though: the 'stream' field used to mean both that the command's output would be streamed to the command log, and that the command would be run in a pseudo terminal (pty). We converted this to 'output: log', which means that the command's output will be streamed to the command log, but not use a pty, on the assumption that this is what most people wanted. If you do actually want to run a command in a pty, you can change this to 'output: logWithPty' instead.`,
|
||||
"0.54.0": `- The default sort order for local and remote branches has changed: it used to be 'recency' (based on reflog) for local branches, and 'alphabetical' for remote branches. Both of these have been changed to 'date' (which means committerdate). If you do liked the old defaults better, you can revert to them with the following config:
|
||||
|
||||
git:
|
||||
localBranchSortOrder: recency
|
||||
remoteBranchSortOrder: alphabetical`,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,12 @@ func (self *MenuDriver) TopLines(matchers ...*TextMatcher) *MenuDriver {
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *MenuDriver) ContainsLines(matchers ...*TextMatcher) *MenuDriver {
|
||||
self.getViewDriver().ContainsLines(matchers...)
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *MenuDriver) Filter(text string) *MenuDriver {
|
||||
self.getViewDriver().FilterOrSearch(text)
|
||||
|
||||
|
@ -15,7 +15,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateNCommits(10)
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {
|
||||
cfg.GetAppState().GitLogShowGraph = "never"
|
||||
cfg.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
markCommitAsBad := func() {
|
||||
|
@ -15,7 +15,7 @@ var ChooseTerms = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateNCommits(10)
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {
|
||||
cfg.GetAppState().GitLogShowGraph = "never"
|
||||
cfg.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
markCommitAsFixed := func() {
|
||||
|
@ -14,7 +14,7 @@ var Skip = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateNCommits(10)
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {
|
||||
cfg.GetAppState().GitLogShowGraph = "never"
|
||||
cfg.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Commits().
|
||||
|
@ -33,8 +33,8 @@ var CheckoutByName = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
}).
|
||||
Lines(
|
||||
MatchesRegexp(`\*.*new-branch`).IsSelected(),
|
||||
Contains("master"),
|
||||
Contains("@"),
|
||||
Contains("master"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -9,7 +9,9 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Try all combination of local and remote branch deletions",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
CloneIntoRemote("origin").
|
||||
|
@ -10,7 +10,8 @@ var DeleteMultiple = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().LocalBranchSortOrder = "alphabetic"
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
|
||||
config.GetUserConfig().Git.RemoteBranchSortOrder = "alphabetical"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var DeleteWhileFiltering = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().LocalBranchSortOrder = "alphabetic"
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("one")
|
||||
|
@ -10,7 +10,9 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
|
@ -10,7 +10,9 @@ var RebaseAbortOnConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, abort when there are conflicts.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
|
@ -10,7 +10,9 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts. Also mark a commit to be dropped before continuing.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
// adding a couple additional commits so that we can drop one
|
||||
|
@ -10,7 +10,9 @@ var RebaseCancelOnConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, cancel when there are conflicts.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
|
@ -10,7 +10,9 @@ var RebaseConflictsFixBuildErrors = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts. While continue prompt is showing, fix build errors; get another prompt when continuing.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
|
@ -11,7 +11,7 @@ var RebaseCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -9,7 +9,9 @@ var RebaseFromMarkedBase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch from a marked base commit",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
NewBranch("base-branch").
|
||||
|
@ -9,7 +9,9 @@ var ResetToUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Hard reset the current branch to the selected branch upstream",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
CloneIntoRemote("origin").
|
||||
|
@ -22,13 +22,13 @@ var SortLocalBranches = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Checkout("master")
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
// sorted by recency by default
|
||||
// sorted by date by default
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("master").IsSelected(),
|
||||
Contains("third"),
|
||||
Contains("second"),
|
||||
Contains("third"),
|
||||
Contains("first"),
|
||||
).
|
||||
SelectNextItem() // to test that the selection jumps back to the top when sorting
|
||||
@ -37,21 +37,21 @@ var SortLocalBranches = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Press(keys.Branches.SortOrder)
|
||||
|
||||
t.ExpectPopup().Menu().Title(Equals("Sort order")).
|
||||
Lines(
|
||||
Contains("r (•) Recency").IsSelected(),
|
||||
ContainsLines(
|
||||
Contains("r ( ) Recency").IsSelected(),
|
||||
Contains("a ( ) Alphabetical"),
|
||||
Contains("d ( ) Date"),
|
||||
Contains("d (•) Date"),
|
||||
Contains(" Cancel"),
|
||||
).
|
||||
Select(Contains("-committerdate")).
|
||||
Select(Contains("Recency")).
|
||||
Confirm()
|
||||
|
||||
t.Views().Branches().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("master").IsSelected(),
|
||||
Contains("second"),
|
||||
Contains("third"),
|
||||
Contains("second"),
|
||||
Contains("first"),
|
||||
)
|
||||
|
||||
@ -59,10 +59,10 @@ var SortLocalBranches = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Press(keys.Branches.SortOrder)
|
||||
|
||||
t.ExpectPopup().Menu().Title(Equals("Sort order")).
|
||||
Lines(
|
||||
Contains("r ( ) Recency").IsSelected(),
|
||||
ContainsLines(
|
||||
Contains("r (•) Recency").IsSelected(),
|
||||
Contains("a ( ) Alphabetical"),
|
||||
Contains("d (•) Date"),
|
||||
Contains("d ( ) Date"),
|
||||
Contains(" Cancel"),
|
||||
).
|
||||
Select(Contains("refname")).
|
||||
|
@ -27,13 +27,13 @@ var SortRemoteBranches = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
PressEnter()
|
||||
|
||||
// sorted alphabetically by default
|
||||
// sorted by date by default
|
||||
t.Views().RemoteBranches().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("first").IsSelected(),
|
||||
Contains("second"),
|
||||
Contains("second").IsSelected(),
|
||||
Contains("third"),
|
||||
Contains("first"),
|
||||
).
|
||||
SelectNextItem() // to test that the selection jumps back to the first when sorting
|
||||
|
||||
@ -41,20 +41,20 @@ var SortRemoteBranches = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Press(keys.Branches.SortOrder)
|
||||
|
||||
t.ExpectPopup().Menu().Title(Equals("Sort order")).
|
||||
Lines(
|
||||
Contains("a (•) Alphabetical").IsSelected(),
|
||||
Contains("d ( ) Date"),
|
||||
ContainsLines(
|
||||
Contains("a ( ) Alphabetical").IsSelected(),
|
||||
Contains("d (•) Date"),
|
||||
Contains(" Cancel"),
|
||||
).
|
||||
Select(Contains("-committerdate")).
|
||||
Select(Contains("Alphabetical")).
|
||||
Confirm()
|
||||
|
||||
t.Views().RemoteBranches().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("second").IsSelected(),
|
||||
Contains("first").IsSelected(),
|
||||
Contains("second"),
|
||||
Contains("third"),
|
||||
Contains("first"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -9,7 +9,9 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick commits from the subcommits view, without conflicts",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
EmptyCommit("base").
|
||||
|
@ -10,7 +10,9 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick commits from the subcommits view, with conflicts",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
|
@ -10,7 +10,8 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -9,7 +9,9 @@ var CherryPickMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick a merge commit",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
EmptyCommit("base").
|
||||
|
@ -9,7 +9,9 @@ var CherryPickRange = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick range of commits from the subcommits view, without conflicts",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
EmptyCommit("base").
|
||||
|
@ -42,8 +42,8 @@ var Checkout = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Confirm()
|
||||
t.Views().Branches().Lines(
|
||||
Contains("* (HEAD detached at"),
|
||||
Contains("branch2"),
|
||||
Contains("branch1"),
|
||||
Contains("branch2"),
|
||||
Contains("master"),
|
||||
)
|
||||
|
||||
@ -63,8 +63,8 @@ var Checkout = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Confirm()
|
||||
t.Views().Branches().Lines(
|
||||
Contains("master"),
|
||||
Contains("branch2"),
|
||||
Contains("branch1"),
|
||||
Contains("branch2"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -11,7 +11,7 @@ var DoNotShowBranchMarkerForHeadCommit = NewIntegrationTest(NewIntegrationTestAr
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("one")
|
||||
|
@ -10,7 +10,7 @@ var Highlight = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "always"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "always"
|
||||
config.GetUserConfig().Gui.AuthorColors = map[string]string{
|
||||
"CI": "red",
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ var CheckForConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cfg.GetUserConfig().Git.LocalBranchSortOrder = "recency"
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
|
@ -43,9 +43,9 @@ var SuggestionsCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("branch-four").IsSelected(),
|
||||
Contains("branch-one"),
|
||||
Contains("branch-three"),
|
||||
Contains("branch-two"),
|
||||
Contains("branch-one"),
|
||||
).
|
||||
Press("a")
|
||||
|
||||
@ -59,8 +59,8 @@ var SuggestionsCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Lines(
|
||||
Contains("branch-three"),
|
||||
Contains("branch-four").IsSelected(),
|
||||
Contains("branch-two"),
|
||||
Contains("branch-one"),
|
||||
Contains("branch-two"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -43,9 +43,9 @@ var SuggestionsPreset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("branch-four").IsSelected(),
|
||||
Contains("branch-one"),
|
||||
Contains("branch-three"),
|
||||
Contains("branch-two"),
|
||||
Contains("branch-one"),
|
||||
).
|
||||
Press("a")
|
||||
|
||||
@ -59,8 +59,8 @@ var SuggestionsPreset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Lines(
|
||||
Contains("branch-three"),
|
||||
Contains("branch-four").IsSelected(),
|
||||
Contains("branch-two"),
|
||||
Contains("branch-one"),
|
||||
Contains("branch-two"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -21,9 +21,9 @@ var FilterUpdatesWhenModelChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("checked-out-branch").IsSelected(),
|
||||
Contains("other"),
|
||||
Contains("branch-to-delete"),
|
||||
Contains("master"),
|
||||
Contains("other"),
|
||||
).
|
||||
FilterOrSearch("branch").
|
||||
Lines(
|
||||
@ -65,9 +65,9 @@ var FilterUpdatesWhenModelChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
PressEscape().
|
||||
Lines(
|
||||
Contains("checked-out-branch").IsSelected(),
|
||||
Contains("other"),
|
||||
Contains("master"),
|
||||
Contains("new-branch"),
|
||||
Contains("other"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -35,8 +35,8 @@ var NestedFilter = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Focus().
|
||||
Lines(
|
||||
Contains(`branch-bronze`).IsSelected(),
|
||||
Contains(`branch-silver`),
|
||||
Contains(`branch-gold`),
|
||||
Contains(`branch-silver`),
|
||||
).
|
||||
FilterOrSearch("sil").
|
||||
Lines(
|
||||
@ -148,8 +148,8 @@ var NestedFilter = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
}).
|
||||
Lines(
|
||||
Contains(`branch-bronze`),
|
||||
Contains(`branch-silver`).IsSelected(),
|
||||
Contains(`branch-gold`),
|
||||
Contains(`branch-silver`).IsSelected(),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
@ -10,7 +10,7 @@ var SelectAuthor = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
commonSetup(shell)
|
||||
|
@ -11,7 +11,7 @@ var DontShowBranchHeadsForTodoItems = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -11,7 +11,7 @@ var DropCommitInCopiedBranchWithUpdateRef = NewIntegrationTest(NewIntegrationTes
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var EditLastCommitOfStackedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -11,7 +11,7 @@ var InteractiveRebaseOfCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var MoveAcrossBranchBoundaryOutsideRebase = NewIntegrationTest(NewIntegrationTes
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -12,7 +12,7 @@ var RewordLastCommitOfStackedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -11,7 +11,7 @@ var ViewFilesOfTodoEntries = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -11,7 +11,7 @@ var MoveToNewCommitInLastCommitOfStackedBranch = NewIntegrationTest(NewIntegrati
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@ -10,7 +10,7 @@ var DoNotShowBranchMarkersInReflogSubcommits = NewIntegrationTest(NewIntegration
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetAppState().GitLogShowGraph = "never"
|
||||
config.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.NewBranch("branch1")
|
||||
|
@ -359,6 +359,23 @@
|
||||
"git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium"
|
||||
]
|
||||
},
|
||||
"ignoreWhitespaceInDiffView": {
|
||||
"type": "boolean",
|
||||
"description": "If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with `\u003cc-w\u003e`.",
|
||||
"default": false
|
||||
},
|
||||
"diffContextSize": {
|
||||
"type": "integer",
|
||||
"description": "The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.",
|
||||
"default": 3
|
||||
},
|
||||
"renameSimilarityThreshold": {
|
||||
"type": "integer",
|
||||
"maximum": 100,
|
||||
"minimum": 0,
|
||||
"description": "The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.",
|
||||
"default": 50
|
||||
},
|
||||
"overrideGpg": {
|
||||
"type": "boolean",
|
||||
"description": "If true, do not spawn a separate process when using GPG",
|
||||
@ -399,6 +416,25 @@
|
||||
"$ref": "#/$defs/LogConfig",
|
||||
"description": "Config for showing the log in the commits view"
|
||||
},
|
||||
"localBranchSortOrder": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"date",
|
||||
"recency",
|
||||
"alphabetical"
|
||||
],
|
||||
"description": "How branches are sorted in the local branches view.\nOne of: 'date' (default) | 'recency' | 'alphabetical'\nCan be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.",
|
||||
"default": "date"
|
||||
},
|
||||
"remoteBranchSortOrder": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"date",
|
||||
"alphabetical"
|
||||
],
|
||||
"description": "How branches are sorted in the remote branches view.\nOne of: 'date' (default) | 'alphabetical'\nCan be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.",
|
||||
"default": "date"
|
||||
},
|
||||
"truncateCopiedCommitHashesTo": {
|
||||
"type": "integer",
|
||||
"description": "When copying commit hashes to the clipboard, truncate them to this\nlength. Set to 40 to disable truncation.",
|
||||
@ -1496,7 +1532,7 @@
|
||||
"topo-order",
|
||||
"default"
|
||||
],
|
||||
"description": "One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'\n'topo-order' makes it easier to read the git log graph, but commits may not\nappear chronologically. See https://git-scm.com/docs/\n\nDeprecated: Configure this with `Log menu -\u003e Commit sort order` (\u003cc-l\u003e in the commits window by default).",
|
||||
"description": "One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'\n'topo-order' makes it easier to read the git log graph, but commits may not\nappear chronologically. See https://git-scm.com/docs/\n\nCan be changed from within Lazygit with `Log menu -\u003e Commit sort order` (`\u003cc-l\u003e` in the commits window by default).",
|
||||
"default": "topo-order"
|
||||
},
|
||||
"showGraph": {
|
||||
@ -1506,7 +1542,7 @@
|
||||
"never",
|
||||
"when-maximised"
|
||||
],
|
||||
"description": "This determines whether the git graph is rendered in the commits panel\nOne of 'always' | 'never' | 'when-maximised'\n\nDeprecated: Configure this with `Log menu -\u003e Show git graph` (\u003cc-l\u003e in the commits window by default).",
|
||||
"description": "This determines whether the git graph is rendered in the commits panel\nOne of 'always' | 'never' | 'when-maximised'\n\nCan be toggled from within lazygit with `Log menu -\u003e Show git graph` (`\u003cc-l\u003e` in the commits window by default).",
|
||||
"default": "always"
|
||||
},
|
||||
"showWholeGraph": {
|
||||
|
Reference in New Issue
Block a user